cancel
Showing results for 
Search instead for 
Did you mean: 

Add bundle product item options on cart page with customer group price in magento.

Add bundle product item options on cart page with customer group price in magento.

foreach ($cartItems as $item) 
    {
        try 
        {
            $product = Mage::getModel('catalog/product')->load($item->getProductId());
            $product->setCustomerGroupId($customer->getCustomerGroupId());
            $product->save();
        
            $options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
            
            $info    = $options['info_buyRequest'];
            $request = new Varien_Object();

            if (!$request->hasQty()) 
            {
                $request->setQty($item->getQty());
            }

            $request->setData($info);
            $cart->addProduct($product, $request);
        }
        catch (Exception $e) 
        {
            Mage::getSingleton('core/session')->addError($e->getMessage());
            $this->_redirectUrl('/quotations');
        }
    }
    $cart->save();

We did this but add bundle product without customer group price.
If you have any idea about this please share.

thanks