I'm working on a small CartThrob site at the moment. The site uses 'points' rather than real currency.
Products are stored in the "products" channel which contains a custom field for the points value of each product. There is also an options field to handle sizes/colours etc.
I have elected to use the points field by default but if a product has options then the points field is left at 0 and the price for each option entered in the options field - I find this easier for the client to understand than have them entering price differences for options.
Now, I need to order the products by price from lowest to highest. This is simple enough where there are no options but is it possible to include those products with option pricing in this ordering?
I'm using the obvious entries tag;
{exp:channel:entries channel="products" dynamic="no" orderby="price" sort="asc"}
... product stuff ...
{/exp:channel:entries}
It would be lovely if I could do something like;
{exp:channel:entries channel="products" dynamic="no" orderby="price|options:price" sort="asc"}
... product stuff ...
{/exp:channel:entries}
I'm hoping I can weave the option products into this somehow without having to resort to setting a "base price" on each one and have the client enter price diffrences for each option.
Is there a way to do this?