Jump to content

Jozsef

Members
  • Content Count

    148
  • Joined

  • Last visited

Everything posted by Jozsef

  1. I decided to go with Snipcart for the time being, the new SnipWire module came just at the right time. Processwire is in such a great need of a good ecommerce module. I hope I can update those stores to Padloper once it's out.
  2. Thanks for the module, it is installed on all PW sites I've ever made. For the code snippet I still couldn't figure out how to run a database backup from an ordinary cron job. Will I have to create a php file with the hook and call that from the cron r can I call a module file directly from cron? Or is it possible to integrate it with the PWCron module? Update: I got it working in a PHP file this way based on @kixe's answer: <?php namespace ProcessWire; include_once("./index.php"); $event = new HookEvent(); $cron_backup = $modules->CronjobDatabaseBackup; $cron_backup->cronBackup($event);
  3. I've played around with this module, thanks @Gadgetto, really impressive work. The demo was up and running in no time including registration etc… and I'be been looking for a feature-rich PW e-commerce solution for quite a while. One question though: is it possible to link the Snipcart customer to a Processwire user? I'm thinking of access control for membership sites. Is there an easy way to add/remove a role depending on the subscription status? Thanks again
  4. I'm sure you do. 🙂 I'm looking forward building headache-free ecommerce sites for my clients and enjoy it while I do. Until then, I'll politely decline those projects. 🙂
  5. I meant very soon. We have been waiting for your announcement pretty much since 2018, it was surely a nice buildup of anticipation. 😄
  6. Does that mean we can expect an announcement in the foreseeable future?
  7. Thanks, @psy, it sure offers more flexibility. I'll play around if I can use hooks to manipulate these fields on save when I get a little time.
  8. Hi, I'm thinking to implement your solution for a couple of primary school websites (they would comfortably fit into the free plan). I can see the module requires a separate title and message field for templates. Is it not possible to just use the existing title/headline and summary/body fields for the message purpose? My purpose would be to provide parents to possibility to get notified each time a news article is published on the website. Thanks for the great work!
  9. I need to build two online stores in the near future. @kongondo, I was wondering if you could share any updates on the progress. Or is it still too early for any kind of announcement? 🙂
  10. @Robin S, Thanks that's well spotted, I haven't thought about the circular reference, I did run into that one when trying to preselect the current page in a form page reference field. But in that case I guess there's not much I could do, except for saving the field manually that doesn't seem to do any harm. Thanks again, I would have never thought about this. I do get the current page in the selector for $orders but that's why I tried to use the $page->id instead of the $page object itself. Didn't help much though, the changes only save for the second time. The strange thing is that the changed field values do populate in the hook and saved to all order but than it's lost between the hook and the actual save.
  11. Thanks, Adrian but the result was the same with "before" too. The field is only saved for the second time.
  12. I added a hook in ready.php to do some extra processing when the "price" field is changed in a page with "event" template. Now the hook is triggered but the price reverts back to the original one on the page after saving it in the admin. Changing and saving the second time saves the new price. Running ProcessWire 3.0.114. Why could that be? I presume this is not the expected behaviour. Here's my code: // Change prices and totals in orders on ticket price change $this->addHookAfter('Pages::saveReady(template=event)', function($event) { $page = $event->arguments('page'); if($page->isChanged('price')) { $price = $page->price; // Get all orders for this event $orders = wire('pages')->find("template=order, order_event=$page->id"); if (count($orders) > 0) { // Change order values based on the new ticket price foreach ($orders as $o) { $o->of(false); // Turn off output formatting so field values can be changed // Calculate new order values $o->price = $price; // Single price $o->total = $price * $o->quantity; // Total price for all tickets $o->handling = $o->total * 0.05; // 5% handling fee on the total price $payments_sum = wire('pages')->sum("template=payment, order_id=$o->id", "total"); // Calculate the total payments $o->balance = $o->total + $o->handling - $payments_sum; // Calculate the new balance based on the new price $o->save(['uncacheAll' => false]); // Save order but don't reset the page cache $o->of(); // Turn back on output formatting } // Add a new notification to confirm the changes $no_changed = count($orders); wire('notices')->message("{$no_changed} orders have been updated with the new price."); } } // Save field otherwise it only saves for the second time $page->save('price'); }); The only way I could get the page to save properly (for the fist time) was to add this at the end of the hook: // Save field otherwise it only saves for the second time $page->save('price'); Can someone spot anything wrong with the code? Or is this a bug?
  13. I'm creating a new page from a form submission. It has been working perfectly but now it fails to save the new page with the error message: Error saving field "title" - Unable to save to 'field_title' for page that doesn't exist in pages table Can any of you spot any error in my code? It's directly in a template file. I probably just can't see the wood for the trees after hours of searching. The funny thing is that I haven't changed anything in that part of the template. // create the page $order = new Page(); // Set the template $order->template = $templates->get("order"); // Set the parent page $order->parent = $pages->get("/orders/"); // Set the title/name field $order->title = $event_title . " - " . $u->first_name . " " . $u->last_name; // $order->headline = $headline; $order->order_event = $event; $order->order_user = $u->id; $order->quantity = $qty; $order->price = $price; // Calculate and save total $order->total = $total; $order->handling = $handling; $order->balance = $balance; // save the order $order->of(false); $order->save(); Update: New pages don't save from the backend either, giving the same error message for each field as admin notifications.
  14. I've just implemented the module on a new site after replacing the iCalcreator library with the latest one as the bundled one doesn't work on PHP 7. I've done it the URL segment way suggested in the first post and used the ->render method. A few notes to the subscription links to save you some time: webcal:// links worked on my Mac in Safari offering to subscribe in the Calendar app. When using https://, Safari just downloads the .ics file instead. For iOS the link must be https://, not webcal:// and also had to modify the URL segment to "ical.ics" to be properly recognised. iOS tries to add the events, not the subscription without the .ics extension. Webcal:// links did not do anything when tapped on iOS13, simply nothing happened. The Google Calendar link must contain an ULR encoded HTTP:// link, https links will give an error message and won't work.
  15. But again, I wouldn't disturb my visitors with yet another popup once they are happy that the original one has disappeared and they can finally get to their business. It's a legal necessity, I get it but most users I talk to hate them, myself included. So I stick to the very minimum that must be done and don't overdo it. I have a link in the footer that brings up the banner (as per instructions) but I won't invite the visitor to change their minds. 😉
  16. I don't know where those various websites you mention quote their text, the below quote is directly from https://gdpr.eu/gdpr-consent-requirements/: "The GDPR does not indicate a shelf life for consent. Theoretically, a person’s consent is indefinite…" It is a requirement though that a person must be able to revoke their consent at any time. But asking them each time is just bad user experience in my opinion.
  17. Question on behalf of those who are not fluent in JS. I read through the js code but still not much smarter on how to setup Google Tag Manager so a tag would fire once consent was given. If I understand correctly I can setup a trigger in GTM that it checks. But would that trigger without page reload? I want Google Analytics report the current page load as soon as the consent is given so I won't loose tracking the entry page. Does the tag manager automatically tracks changes in the dataLayer or only on page load?
  18. Thanks, that is brilliant, multiple solutions for the same problem, built right into the core. PW just keeps giving. 🙂
  19. Sorry if it was covered, I haven't found an answer by searching in Google or on the forum. The client is an estate agency and they want that all images, pdf brochures etc… would disappear from their site when they unpublish or delete a property page. Is that only possible with a custom module that hooks into unpublish or delete? It seems that ProcessWire doesn't delete the folder associated with the page from assets/files/ automatically. Similarly, if the page is unpublished, file uploads are still publicly available with the direct url. As a result, Google would keep them in their index forever giving false results. I understand that images can be used elsewhere in the site so it makes sense to keep them available, however since images/files belong to a page, keeping their public status synced could also make sense. Any suggestion is welcome, maybe I haven't thought of something else.
  20. Yes, I completely agree with that and wanted to bring it up. Especially in the backend when previously we got "Padloper Orders" and "Padloper Reports" etc… It feels much more integrated when you look at something like "Craft Commerce" or "Perch Shop"
  21. Does that mean that products are not going to be ProcessWire pages the same way as they were in Padloper 1? It was such a great integration and made it super easy to edit product templates. Or will they still be available in the Templates section in admin? Great progress, can't wait to test it out.
  22. I agree, Padloper should work the Processwire way, that's the whole point of it. Using multi-language fields and page objects for products is the way to go. I guess most of us who builds a PW store will expect it that way.
  23. I put my vote on this one too. Conventions play a big role in usability and people still use computers or large enough tablets to get work done (e.g. managing a shop).
  24. Count me in too. 🙂 I'm also waiting for this for a project where the website is done and I have to add the shop in later. No point to go with the old version. Let me know if you need any testing done, happy to help and pay the price.
×
×
  • Create New...