1

how to check the group product is in cart or not. i am adding into with below code.

$cart = Mage::getModel('checkout/cart');
$params = array('super_group' => $pro);
$cart->addProduct($product, $params);
$cart->save();

2 Answers 2

1

get cart items, then in loop you can check parent Id by child for item (product):

Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($productId);

0

You need to remove it by item id

$itemId = 'Your Item Id';
Mage::getModel('checkout/cart')->removeItem($itemId);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.