Jump to content

Jozsef

Members
  • Content Count

    149
  • Joined

  • Last visited

Community Reputation

52 Excellent

1 Follower

About Jozsef

  • Rank
    Sr. Member

Contact Methods

  • Website URL
    http://www.focuswebsolutions.ie

Profile Information

  • Gender
    Male
  • Location
    Dundalk, Ireland

Recent Profile Visitors

2,094 profile views
  1. @kongondo, I am aware that this doesn't help, but I was wondering just how close are we to an announcement? The current COVID situation just brought so many extra ecommerce projects to life, a beta / alpha release could pick up great momentum with the PW community, I'm sure.
  2. 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.
  3. 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);
  4. 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
  5. 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. 🙂
  6. I meant very soon. We have been waiting for your announcement pretty much since 2018, it was surely a nice buildup of anticipation. 😄
  7. Does that mean we can expect an announcement in the foreseeable future?
  8. 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.
  9. 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!
  10. 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? 🙂
  11. @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.
  12. Thanks, Adrian but the result was the same with "before" too. The field is only saved for the second time.
  13. 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?
  14. 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.
  15. 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.
×
×
  • Create New...