magento获得可配置产品的所有子产品

[php]//get a model to use
$product = Mage::getModel(‘catalog/product’);
//load it up
$parent = $product->load();
//get the collection
$children = Mage::getModel(‘catalog/product_type_configurable’)
->getUsedProductCollection($parent);
//iterate & enjoy
foreach($children as $child){
$child = $product->load($child->getId());
var_dump($child->getName());
}[/php]

标签