Last Updated: February 25, 2016
·
3.361K
· dsalvagni

Magento - getting the associated products of a grouped product

<?php 
    if($_product->getTypeId() == "grouped"):
        $products = $_product->getTypeInstance(true)->getAssociatedProducts($_product);
            foreach($products as $p):
                $productSimple = Mage::getModel('catalog/product')->load($p->getId())
            endforeach;
    endif;
?>