Question

I want to write an observer function which will fire whenever the cart total is changing.

Eg: When add/remove products in the cart, 
Add rewards/coupon codes to the cart

My observer function will check whether the cart grand total is greater than zero. If not it will do some calculation with the grand total and save that calculated value to the quote.

I have tried the following events. But non of them fulfilled the requirement.

    controller_action_postdispatch_checkout_cart_index
sales_quote_address_collect_totals_before

Any suggestions will be appreciated. Thanks in advance.

Was it helpful?

Solution

The following event did the trick.

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