1

I added new functionality to add multiple products in cat, but when I add more products and go in mini cart on header, only first added product have price and other are with price 0.00. In the modified cart controller I have added

$cart->getQuote()->setTotalsCollectedFlag(false);

and after

$cart->save();

I have added update cart

Mage::getSingleton('checkout/session')->setCartWasUpdated(true);    

This piece of code, it gives qty of products but not and the prices, still showing only price for one product. And others are 0.00. Can anyone help Please.

1
  • Could you post your complete modified cart controller. Commented Jun 18, 2014 at 8:29

2 Answers 2

3

What you could do is try to fire the collection of totals in your quote with the following snippet:

$cart->getQuote()->setTotalsCollectedFlag(false)
    ->collectTotals()
    ->save();
-3

You are using getSingleton Method Please use getModel Method.

Mage::getSingleton('checkout/session')->setCartWasUpdated(true);    

After that remove var/session folder. Flush your cache and test.

Hope It will work.

1
  • 1
    Does this should look like Mage::getModel('checkout/session')->setCartWasUpdated(true); if it is I already have tried doesn't work. The point is that when i go to cart mini cart is updating, with full price of all products.
    – Mike
    Commented Jun 3, 2014 at 22:08

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.