0

I've successfully extended the core Mage_Customer_AccountController via inheritance (using an approach very close to this one), however I'd rather use events to add my extra functionality.

In my case I need to hook in to the request before it's sent to the loginAction(), as well as before _loginPostRedirect().

So far I've found mention of an event, controller_action_postdispatch_customer_account_loginPost, which should be close to what I need for the _loginPostRedirect() hook. I've tried finding the exact point that this event is raised to confirm, but it appears to be a dynamic event which I haven't approached before.

So, to sum up my question, which events would I need to hook into? And if the controller_action_postdispatch_customer_account_loginPost is involved, could someone point me to intro resources on dynamic events and their dispatch?

1 Answer 1

1

I think what you are looking for is actually the predispatch rather than postdispatch events unless I am miss understanding your request.

These events can be found in Mage_Core_Controller_Varien_Action->preDispatch where right at the bottom you see the following lines of code.

Mage::dispatchEvent('controller_action_predispatch', array('controller_action' => $this));
Mage::dispatchEvent('controller_action_predispatch_' . $this->getRequest()->getRouteName(),
    array('controller_action' => $this));
Mage::dispatchEvent('controller_action_predispatch_' . $this->getFullActionName(),
    array('controller_action' => $this));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.