cancel
Showing results for 
Search instead for 
Did you mean: 

How can we get Group Product id into the cart page?

How can we get Group Product id into the cart page?

we need to get group product id into the cart page.

We get all group product items ids into the cart page but not get group product id.

Please share if anyone have idea.

thanks.


2 REPLIES 2

Re: How can we get Group Product id into the cart page?

If you have child item id of grouped product, You can get parent Id by below way,

 

$childId = 33;
$parentId = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($childId);


echo "<pre>";print_r($parentId);
If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: How can we get Group Product id into the cart page?

We used the below code: 

$values = unserialize($_item->getOptionByCode('info_buyRequest')->getValue());
$parentId = $values['super_product_config']['product_id'];
$group_product=Mage::getModel('catalog/product')->load($parentId);

But, into the admin side  

Order View => Items Ordered = table have not worked above code.

How can we find into the admin side Order View => Items Ordered table?