Question

We have set up few shopping cart price rules which gives discount on entire category. When customer adds some products from this category to their cart, our mini cart shows inconsistency where it displays discount for previously-added items in cart but not for the new one which just got added. When navigating to shopping cart page the discounted prices gets reflected on mini-cart though. I can understand as it's a shopping cart rule it does not show immediately in mini-cart, but this is confusing for customers as they do see discount on other items.

Any idea how I can make sure every time a product is added to cart it shows shopping cart discount immediately before customer go to cart/checkout page?

Thanks

Was it helpful?

Solution

Nevermind I figured it out. All I had to do was to call collectTotals() before getting cart items so that appropriate discounts are applied before fetching cart items.

$_items = Mage::getSingleton('checkout/cart')->getQuote()->collectTotals()->getAllVisibleItems();

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top