1

For some reason after upgrading to 1.9.1 or maybe before

when visitors logging in they can't logout

www.newtech.co.uk

Any help will be appreciated

  • 1
    may be their was some edits in the core file.do you have any backups of working site ? – Pradeep Sanku Feb 4 '15 at 17:01
7

Your developer hardcoded the "login". I don't know how your code looks like, but it is one of two things:

  1. You are missing this XML:

    <!--
    Load this update on every page when customer is logged in
    -->
    
    <customer_logged_in>
        <reference name="top.links">
            <action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
        </reference>
    </customer_logged_in>
    
    <!--
    Load this update on every page when customer is logged out
    -->
    
    <customer_logged_out>
        <reference name="top.links">
            <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
        </reference>
        <remove name="reorder"></remove>
    </customer_logged_out>
    
  2. You need to update your hardcoded value with something like:

    <?php if (!Mage::getSingleton('customer/session')->isLoggedIn()): ?>
        <a href="<?php echo Mage::helper('customer')->getLoginUrl(); ?>"><?php echo $this->__('Login') ?></a>
    <?php else: ?>
        <a href="<?php echo Mage::helper('customer')->getLogoutUrl(); ?>"><?php echo $this->__('Logout') ?></a>
    <?php endif; ?>
    
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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