Redirecting Magento Customers After Log Out.

Request a callback

Redirecting Magento Customers After Log Out.

Our client NexxtShow uses a separate site for their CMS needs. They reasonably expect customers to be redirected to that site after clicking the 'logout' button.

Implementing their request turned out to be extremely simple. Read on if you'd like to replicate our process. 

In your theme find the file template/customer/ logout.phtml,  and find the bit which looks like this:

<?php echo Mage::helper('customer')->__('You have logged 
out and will be redirected to our homepage in 5 seconds.') ?></p>
<script type="text/javascript">
//<![CDATA[
    setTimeout(function(){ 
        location.href = '<?php echo $this->getUrl() ?>'},5000);
//]]>
</script>

Change '<?php echo $this->getUrl() ?>' for the URL you need, in this case it was 'http://nexxtshow.com/'.

Voilà!