I have two attribute sets say
i)Shirts
ii)Pants
The configurable product options are
shirt_color/shirt_size
pant_color/pant_size
They have one thing in common.
How to display only the available sizes for each configurable product if available? So far I tried..
<div class='divider'>
<?php /*?> <?php $cProduct = Mage::getModel('catalog/product')->load($_product->getId());
//check if product is a configurable type or not
if ($cProduct->getData('type_id') == "configurable")
{
//get the configurable data from the product
$config = $cProduct->getTypeInstance(true);
//loop through the attributes
foreach($config->getConfigurableAttributesAsArray($cProduct) as $attributes)
{
echo count($attributes["values"])." availables";
?>
<div class="super_attribute[<?php echo attributes['attribute_id'] ?>]" id="attribute<?php echo $attributes['attribute_id'] ?>">
<?php
foreach($attributes["values"] as $values)
{
echo $values["label"];
}
?>
</div>
<?php
}
}?><?php */?>
<?php
?> </div>
My output was
I need to fetch only the available sizes.. Need a solution...