$product = Mage::getModel(‘catalog/product’) ->setStoreId(Mage::app()->getStore()->getId()) ->load($productId); if($product->type_id==“simple”) { $parentId=$product->loadParentProductIds()->getData('parent_product_ids'); if(isset($parentId[0])) { //configurable product $product=Mage::getModel('catalog/product')->load($parentId[0]); } }