0

For some specific reason, I need to add and remove items to the cart programmatically. Functionality appears to work but when I click on other category pages the mini shopping cart still shows old qty unless I click on the mini cart.

I tried different ways like below

$quote = Mage::getModel('checkout/cart')->getQuote();
$quote->collectTotals();
$quote->save();

Also

$cart = Mage::getModel('checkout/cart');
$cart->init();
$cart->save(); Mage::getSingleton('checkout/session')->setCartWasUpdated(true);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.