I'm getting the simple products of a configurable with the following code:-
if($_product->getTypeId() == "configurable"): $conf = Mage::getModel('catalog/product_type_configurable')->setProduct($_product); $simple_collection = $conf->getUsedProductCollection() ->addAttributeToSelect('*') ->addFilterByRequiredOptions(); endif;
And then with this collection, I'm conditionally displaying a size chart which works perfectly (
foreach($simple_collection as $simple_product)) however I need to determine what table headers to use in the chart by another condition (and currently, I can only think of doing this by category unfortunately).
Rather than just loading the above collection by category ID though, is there any way I can build into the existing collection a way to determine what the category ID is of the configurable product and then use an
if statement as necessary in the chart to display various data based on the category ID?
I know how to load the collection from a category ID but unsure if it is possible to determine the current category from