how can I redirect the customers after logout to default store view in magento?
In logout I redirect them another store view.
how can I redirect the customers after logout to default store view in magento?
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.
Unfortunately there’s not a convenient event hook to manipulate the logout redirect location.
Mage_Customer_AccountController::logoutAction()sets a redirect to::logoutSuccessAction()on the response object after thecustomer_logoutevent is dispatched, and it’s the rendering of the customer/logout.phtml template which uses PHP tosetecho a javascript param to redirect to the homepage with no OOB possibility to pass an arg for an alternate JS-based redirect.I think the cleanest solution would be to observe
controller_action_postdispatch_customer_account_logout, grab the controller object, and overwrite the location header using the response object’ssetRedirectWithCookieCheck()method: