A configurable product can have multiple other products associated to it.This tutorial describe How can get all the simple products associated with a configurable product.
Get all product id of all simple products associated with a configurable product.
$AssociatedProducts = Mage::getModel('catalog/product_type_configurable')
->getChildrenIds($_product->getId());
Get collection of all the simple products associated with a configurable product.
$product = Mage::getModel('catalog/product')->load($product_id);
$childProducts = Mage::getModel('catalog/product_type_configurable')->
getUsedProducts(null,$product);
Best of luck
Get all product id of all simple products associated with a configurable product.
$AssociatedProducts = Mage::getModel('catalog/product_type_configurable')
->getChildrenIds($_product->getId());
Get collection of all the simple products associated with a configurable product.
$product = Mage::getModel('catalog/product')->load($product_id);
$childProducts = Mage::getModel('catalog/product_type_configurable')->
getUsedProducts(null,$product);
Best of luck
No comments:
Post a Comment