You must have your configurable product Id, My configurable product Id is 15
$id=15; //Use your Configurable product Id $_product = new Mage_Catalog_Model_Product(); $childIds = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($id); foreach($childIds[0] as $key=>$val) { $associatedProduct = Mage::getModel('catalog/product') ->load($val); echo $associatedProduct ->getName(); //Let you have a color attribute in each associated product then you can fetch by $colorids[] = $associatedProduct ->getColor(); $colorname[] = $associatedProduct ->getAttributeText('color'); }
Hope it Helps... Thanks.....
No comments:
Post a Comment