$query = ("SELECT * FROM products WHERE catid = :c AND (producttype_lightweight = 'yes' OR producttype_backlit = 'yes' OR producttype_traditional = 'yes') LIMIT $offset, $rowsPerPage");
I need to be able to assign each product to one that one top level product type, of three.
These are never changed, so I am choosing it to be static fields rather than dynamically named.
But when it comes to the category page, if they choose Lightweight as the top level, and then Marble as the second level, I want it to only show those where the category ID is for marble (easy) and producttype_lightweight is 'yes'.
But on the same set of code, if they chose Marble and producttype_traditional is 'yes', I want only products to show for that.
With the code above, it's showing me products that are in marble, but also in both lightweight and traditional. It's clear to see why, but I don't see another way around it.
There will be times when a product is in BOTH those top levels, or even three levels. But if they go to Traditional > Marble, I want it to only show those there the catid is for marble, and the traditional is a yes.