What are the events are fired in the front controller in Magento and what are the functionality of those events ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are 4:
controller_front_init_before– the first event triggered and can be used for any sort or redirects, logging or benchmarkingcontroller_front_init_routers– here custom routers can be addedcontroller_front_send_response_before– last chance to set cookie, modify output or close benchmark. Note: That’s why it is not a good idea to echo anything in action controller.controller_front_send_response_after– here you can clean or write cache, log something, any other cleaning or action user doesn’t have to wait for.