Created
July 21, 2015 07:58
-
-
Save WENKz/4ce1627a223636bf8fa7 to your computer and use it in GitHub Desktop.
Magento: Get a configurable products associated simple product data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($_product->getTypeId() == "configurable"): | |
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($_product); | |
$simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions(); | |
foreach($simple_collection as $simple_product){ | |
echo $simple_product->getSku() . " - " . $simple_product->getName() . " - " . Mage::helper('core')->currency($simple_product->getPrice()) . "<br>"; | |
} | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment