Monday, 18 August 2014

How to check user login or not in magento

<?php $myStatus = Mage::getSingleton('customer/session')->isLoggedIn() ?>

<?php if($myStatus): ?>
 <a href="<?php echo $this->getUrl('shipping') ?>">Customer Support (24x7)</a>
<a href="<?php echo $this->getUrl('customer/account/logout/') ?>">Logout </a>

<?php else: ?>



<a href="<?php echo $this->getUrl('customer/account/login/') ?>">Login </a>|

<a href="<?php echo $this->getUrl('customer/account/create/') ?>">Register</a>

<?php endif ?>

No comments:

Post a Comment