Created
April 16, 2015 02:17
-
-
Save corpsefilth/afc4c290b79116e2318e to your computer and use it in GitHub Desktop.
display simple product information from configurable product.
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
<?php | |
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; | |
?> | |
<?php | |
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->getPrice(); | |
} | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment