Thursday, June 4, 2015

magento- How to check user login or not in magento

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