Jump to content

Tyssen

Members
  • Content Count

    301
  • Joined

  • Last visited

Community Reputation

42 Excellent

About Tyssen

  • Rank
    Distinguished Member

Contact Methods

  • Website URL
    https://www.tyssendesign.com.au/

Profile Information

  • Gender
    Male
  • Location
    Brisbane, Australia

Recent Profile Visitors

4,841 profile views
  1. @OLSA In my case, I have a base product which can have a variety of different add-ons added to it. So base price might be $50 and you might have 10 add-ons which are all different prices. So the final price could be $50 + add-on A + add-on B but it could be $50 + every permutation of 10 different numbers added to each other, e.g. A+B A+B+C A+C A+B+C+D B+C+D etc. For everyone else who has replied so far, thanks for your suggestions. I'm actually looking into using https://github.com/violet-php/streaming-json-encoder as it will avoid having to load the whole data set into memory, which is similar to what @LostKobrakai suggested. No, because in some cases, the add-ons are for subscription products with Stripe. If they were separate products, then each one would need to be a separate subscription which then gets messy to manage for the customer and client.
  2. And in case you're wondering, Snipcart does have different price modifier data-attributes that can be used which would avoid all of this, but… and this is why I'm still having to do it this way… you can only choose one option, e.g. if you buy a shirt it might come in S, M or L and the price might go up the bigger it gets. But you're only choosing one modifier. In my case I have a base product which can be ordered for 1, 3, 6 or 12 months (which changes the base price), but it can also have a range of optional add-ons added to it which also change the price.
  3. Ideally, yes, there would only be unique combinations. But it's not been set up to filter them out yet because it's not strictly necessary. The reason for that is a little hard to explain. This is for a site that uses Snipcart. The way Snipcart works, you click on a button which has data-attributes for price and ID (and other things) on it and it adds the item to the cart and then at the end of the process, by way of validation, Snipcart returns to your page to check that a button exists with the price and ID that you added to your order. You can either have hidden buttons in the page with the data-attributes that match the order, or you can instruct Snipcart to use a JSON file which contains all that info instead. This is why changing prices on the fly doesn't work, because the price that you've arrived at by selecting different combinations of options, has to exist somewhere that the Snipcart validator can access. So to answer another of your other questions, yes I do need to be able to present several thousand different combinations to the Snipcart validator, not a site visitor, otherwise the order won't validate.
  4. This isn't strictly a Processwire question, but it is being used on a PW site, so if anyone has any ideas about this question, I'd be most grateful.
  5. Thanks, that was it. 👍 parent.parent didn't work but I did a find on the template instead.
  6. I'm outputting the items in an ordered list so that's showing the count for me. The max number it displays is 50. I've temporarily disabled the site's prepend and append files so the only thing showing on the page now is the output from the selector I posted above. Are there any config settings either in config.php or in the admin which might restrict the number?
  7. I'm trying to output a long list of pages. If I do this: $subpages = $pages->get('/shop/products/')->child->children; the output is limited to 50 items. If I do this: $subpages = $pages->get('/shop/products/')->child->children('limit=9999'); the output is also limited to 50. But if I enter any number less than 50, then that's how many get displayed. What am I missing?
  8. There's actually two instances of the fieldtype: one on a single page with just a single image, but the bulk of the content of the site, so nearly 600 pages, are using the fieldtype with up to 12 images uploaded per page. I did this, and the new field in the new template worked fine. Do you mean permissions? If so, they seem to be. All 644 with same owner/group.
  9. PW was on v 2.5 and is now on 3.0.148 and CroppableImage was on 0.8.4 Alpha and is now on CroppableImage3 1.2.0, although initially it was upgraded to 1.1.6. This upgrade has been a long, drawn-out process with the client going silent for long periods of time. I did the upgrade locally quite a long time ago so don't have a clear recollection of the exact process I followed. It wasn't until just recently that the problem with uploading was noticed. I think I upgraded PW first not realising that CroppableImage wasn't compatible with PW 3.x. And then replaced the CroppableImage module folder with CroppableImage3 and then updated the fieldtype (there's only one) via the admin. I didn't realise user roles had to be updated and I've just gone through and assigned the Crop images with CroppableImage3 role via the admin. I've obviously made a mess of the upgrade and didn't take enough care of noting the changes I've made. But any advice you could give on how to get out of this hole I've dug for myself would be appreciated.
  10. I upgraded an older version of PW to 3.0.x and in the process upgraded all the associated modules including CroppableImage to CroppableImage3 but somewhere along the way from moving the site from dev to live something has gone wrong because now there are problems uploading images. Sometimes they'll upload and sometimes when you click on the Choose File button, or drag an image into the field, nothing happens. On a test page that already had an image in it, I couldn't get another one to load and there were no errors in the console. After removing the one image and resaving, neither the choose file button or dragging were working. Clicking the choose file button produced no errors, but dragging returned: Uncaught TypeError: can't access property "grid", config.CroppableImage is undefined /site/modules/CroppableImage/InputfieldCroppableImage/InputfieldCroppableImage.js?v=83-1429629453:405 jQuery 7 /site/modules/CroppableImage/InputfieldCroppableImage/InputfieldCroppableImage.js?v=83-1429629453:403 jQuery 11 from InputfieldCroppableImage.js:405:21 I've also just updated to 1.2.0 but the problem still remains. Any idea what I can do to fix it?
  11. @bernhard Presumably the hook for #2 could look the same as the one @kongondo wrote above? It doesn't necessarily need to be a child of a particular page, but instead match a template. And for #3, what would the magic link look like, how would it be generated?
  12. Where's the place to post Promailer questions before purchasing the module? @ryan
  13. So in ready.php it would be something like this? wire()->addHookAfter('Pages::published', function($event) { $page = $event->arguments('page'); $t = wire()->templates->get($page->template); if($t->name == 'blog') { // what goes here? } $event->return = $page; });
  14. So would that still be using a webhook as described in #1 by @kongondo above and using ProMailer for #2? Or does the triggering of emails when pages are published exist in ProMailer already?
  15. I can see that you can use the module to add subscribers to a Mailchimp list, but it seems like you could just use a Mailchimp form to do that. I'm not seeing anything in there about there being a link between publishing content in Processwire and then subscribers receiving emails about that event.
×
×
  • Create New...