On my site, there are products that have:
1. No options
2. Options with color variations
3. Price options
4. Options of both color and price
If a product has no color or price options, it should go directly to the cart. However, if the product has options of either price or color or both, then I am trying to direct a visitor to pages where they can select more options, but the logic in my code only works when there are ONLY Product Options ($ProductOptions). When there are Price options or variations ($ProductPr), the logic breaks down. Any ideas on how to make it work? Here is the code:
Transfer the logic to the controller or the model (probably the model). If it's not your code, try using an Extension (probably DataExtension).
It's the easiest sure-fire way to deal with such issues, and is arguably where such logic belongs.
You've been a HUGE help. Thank you so much on this (and great Yoda quote, by the way). I've been intimidated some aspects of Silverstripe, but this is forcing me to "Boldly go where" I haven't gone before - which is a good thing!