<?php
if($_product->getTypeId() == "configurable") {
$ids = $_product->getTypeInstance()->getUsedProductIds();
?>
<ul>
<?php
foreach ($ids as $id) {
$simpleproduct = Mage::getModel('catalog/product')
->load($id);
?>
<li>
<?php
echo $simpleproduct->getName() . " - " .
(int)Mage::getModel('cataloginventory/stock_item')
->loadByProduct($simpleproduct)->getQty();
?>
</li>
<?php
}
?>
</ul>
<?php
}
?>
(Visited 62 times, 1 visits today)