In the basic behaviour of Magento, when the customer logouts, there is a special page with a redirection few seconds after.

You can easy change this redirection without rewrite Magento core.

Here is the config XML :

<?xml version="1.0"?>
<config>
	<!-- ... -->
    <frontend>
        <events>
			<!-- ... -->
            <controller_action_postdispatch_customer_account_logout>
                <observers>
                    <NAME_OF_YOUR_OBSERVER>
                        <class>NAME_OF_YOUR_MODULE/observer</class>
                        <method>logoutRedirect</method>
                    </NAME_OF_YOUR_OBSERVER>
                </observers>
            </controller_action_postdispatch_customer_account_logout>*
			<!-- ... -->
        </events>
    </frontend>
	<!-- ... -->
</config>

And the method to add in your observer :

<?php

public function logoutRedirect(Varien_Event_Observer $observer){
		$observer->getControllerAction()->setRedirectWithCookieCheck('/');
	}

?>
Remove Magento redirection after customer logout
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *

We use cookies to ensure that we give you the best experience on our website.
Ok