Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/31/2020 in all areas

  1. We got hit by hurricane/tropical storm Zeta overnight Wednesday and it took down the power lines in our neighborhood, and in many places in Atlanta. We aren’t supposed to get the electricity back till Monday, though I’m hoping they might surprise us and have it back sooner. But I’m basically offline other than my cell phone, charged in the car. I work off a desktop computer (iMac) so not able to do any kind of computer work until the electricity is back. As a result, I don’t have any updates for you this week. Though I was making great progress on the ProcessWire modules directory site up until the storm came through and we lost electricity. For now my job is to keep the flashlights working and find ways to keep what’s left of the food from going bad (since the fridge/freezer is also offline). The same thing happened with hurricane Irma, back in ProcessWire 3.0.75. It took out the power for several days. Though we weren’t in the middle of a covid hotspot back then. The deal is that Atlanta has a lot of big old trees, and all the power lines are above ground. So any time a significant storm rolls through, it knocks down a tree, the tree knocks down a power line, and the power goes out. Atlanta is pretty big, so multiply that by a few hundred trees and power lines (and a pandemic), and much of the city is out for awhile. Even a little storm sometimes knocks out the power for a few hours. That’s just one of the joys of where I live. I’m sorry about that, but since we’re supposed to be back online by Monday, I expect to have good updates for you next week. Thanks for reading and have a great weekend!
    14 points
  2. I don't think so... the trick with PW hooks is to find out which hook to use, and whether to use before or after. Page::loaded seems to be the wrong method to hook into for what you want to achieve. Here are some code-bits I used in the past, and they all work as expected (inside site/ready.php) $this->addHookAfter('Pages::saveReady', function (HookEvent $event) { $page = $event->arguments[0]; // ---------- $pages->addHookAfter("ProcessPageEdit::buildForm", function (HookEvent $event) { $page = $event->object->getPage(); $form = $event->return; // ---------- $this->addHookBefore('Pages::saved(template=invoice, parent=23444)', function(HookEvent $event) { $page = $event->arguments(0);
    3 points
  3. I currently manage a webshop with 225k products from around 60 suppliers and few millions of euros in yearly sales. I will share a bit from my experience, the issues I encountered and the facts you will want to consider before you start picking your solution. Self or Client Questionnaire 1. What is the max number of products your shop will have in 5 years from now? based on that you will need yo explain and educate the client why he will need an erp or pim software. 2. How many supplies you estimate that you will have and how they deliver the data. how often the product data is updated? 3. Whats is the monthly /yearly marketing budget? (Looking for only long term partnerships, I usually avoid signing a DEV& SEO contract with someone who has no idea of their marketing budget. It might sound crazy... but there is a clear view that your client will have enormous SEO expectations with No or limited budget. Main Issues : - each supplier comes with their products in a different template, filetype and the way they notify their resellers about the price updates. - for a big shop you will always want to work with a product information management (PIM) software. Are you ready to build your own PIM? - in order to increase your sales you will always want to send your products feed to site like amazon, google shopping etc... are you ready to invest and develop those solutions? - most of the shops are required to be connected with an ERP solution and at the end of the day you will need to make those systems to work together as much as possible. SHOP-ERP-PIM and resellers websites if any. My advice is to choose the only solution that is stable, capable and really secure. The multitude of plugins in store its always a plus and i will always like to pay 200$ on a good plugin than to develop it from scratch with a final cost of 2k. Please don’t try to reinvent the weel !!! Give yourself the luxury to work on marketing and SEO. Increasing your sales and google rankings are the only things that really matters at the end. Good luck!
    2 points
  4. This is a lightweight alternative to other newsletter & newsletter-subscription modules. You can find the Module in the Modules directory and on Github It can subscribe, update, unsubscribe & delete a user in a list in Mailchimp with MailChimp API 3.0. It does not provide any forms or validation, so you can feel free to use your own. To protect your users, it does not save any user data in logs or sends them to an admin. This module fits your needs if you... ...use Mailchimp as your newsletter / email-automation tool ...want to let users subscribe to your newsletter on your website ...want to use your own form, validation and messages (with or without the wire forms) ...don't want any personal user data saved in any way in your ProcessWire environment (cf. EU data regulation terms) ...like to subscribe, update, unsubscribe or delete users to/from different lists ...like the Mailchimp UI for creating / sending / reviewing email campaigns *I have only tested it with PHP 7.x so far, so use on owners risk EDIT: Since 0.0.4, instructions and changelog can be found in the README only. You can find it here ? If you have questions or like to contribute, just post a reply or create an issue or pr on github, thanks!
    1 point
  5. No need at all to apologise. We hope you and your family stay safe and well.
    1 point
  6. Yes, this is easiest to do if you apply the sorting as the page is saved. So you won't see the sorting immediately after the images are uploaded, but will see the sorting after the page is saved and Page Edit reloads. In the examples below you would add the hook code to /site/ready.php The sort settings for child pages prevents the editor from making any other sort order apart from the one specified. So if you want something like that for images, where the newest images are sorted first, it's very simple: $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); $pages = $event->object; if($page->template == 'your_template') { if($page->isChanged('your_images_field')) { // Sort the images from newest to oldest $page->your_images_field->sort('-created'); } } }); But if you want to sort newly uploaded images first once the page is saved, but still let your editors customise the sort order after that, then you can use this hook: $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); $pages = $event->object; if($page->template == 'your_template') { if($page->isChanged('your_images_field')) { // Get the old version of the page, without the current changes $old_page = $pages->getById($page->id, [ 'cache' => false, 'getFromCache' => false, 'getOne' => true, ]); // Get the names of the existing images on the old page $existing_image_names = $old_page->getFormatted('your_images_field')->implode('|', 'basename'); // Get the newly added images $new_images = $page->your_images_field->find("basename!=$existing_image_names"); // Prepend the new images to the start of the Pageimages WireArray foreach($new_images as $new_image) { $page->your_images_field->prepend($new_image); } } } });
    1 point
  7. Cs-cart is my favorite. Really flexible, scalable and reliable. Exact as ERP and Akeneo as PIM
    1 point
  8. Do you use MarkupPagerNav module? If so, there is 'baseUrl' property where probably you should pass your modified page URL
    1 point
  9. If it's not a matter of life or death, I sometimes just leave the page hidden instead of unpublished for a short while... hidden is viewable with the link but it shouldn't show up in the nav, etc.
    1 point
  10. You can use the API for this - covered in this post:
    1 point
  11. See my document "Techniques for flexible page layouts in Processwire." There are many ways to accomplish this https://docs.google.com/document/d/1peY-FUpevKgy87cKOxIVz8jwcv2-3c61zbiJr3QKO6c/edit# The notes are rough, but I hope it helps someone.
    1 point
×
×
  • Create New...