How to get parent product id in magento?

后端 未结 5 1795
旧巷少年郎
旧巷少年郎 2021-02-07 01:55

I know that in Magento 1.4.2.0 one gets parent id\'s like so

list( $parentId ) = Mage::getModel(\'catalog/product_type_configurable\')
                                   


        
5条回答
  •  甜味超标
    2021-02-07 02:27

    Here is another solution for magento 1.7.2

    $parentIds = Mage::getSingleton('catalog/product_type_configurable')->getParentIdsByChild($mageProduct->getId());
    

提交回复
热议问题