How to add Login/Logout code on magento
- November 30, 2013
Login/Logout Code in Header
<?phpif(! Mage::getSingleton('customer/session')->isLoggedIn()): ?>
<a href="<?php echo Mage::helper('customer')->getLoginUrl(); ?>"><?phpecho$this->__('Login') ?></a>
<?phpelse: ?>
<a href="<?php echo Mage::helper('customer')->getLogoutUrl(); ?>"><?phpecho$this->__('Logout') ?></a>
<?phpendif; ?>