0

What event is fire when initialize the shopping cart just after the customer logged in? This event should set the remained cart items as well as the grand total and subtotal for that cart.

Can anyone suggest the event please?

Thanks in advanced.

1
  • What do you want to do? You can use checkout_quote_load_after, collect_totals_before/after and a lot more. Nov 5, 2013 at 8:09

2 Answers 2

2

There are various events during logging in and shopping cart initialization.

You can put the following in the function dispatchEvent in Mage.php to find out which events are dispatched:

file_put_contents('/var/log/events.log',"$name \n",FILE_APPEND);

This list will get long so it might be clever to start logging right before you log in and stop logging afterwards. That makes it easier to obtain the available events.

3

When the customer logs in, the customer_login event is dispatched. The module Mage_Checkout listens to the event and calls the method Mage_Checkout_Model_Observer::loadCustomerQuote().

This is where the cart (= quote) is loaded. I don't know what you want to do exactly but I guess this is the place you are searching for.

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.