Latest News : 亮瞎双眼的那些年!

Magento判断用户是否登录

Magento admin 1258 views 0 comments

        <?php if(Mage::getSingleton( ‘customer/session’ )->isLoggedIn()) {  ?>
<li class=”level0 nav-1 contact-link level-top”>
<a href=”<?php echo Mage::getUrl(‘customer/account/logout’); ?>” class=”level-top”>
<i class=”icon-login-3″></i>
<span><?php echo $this->__(‘Logout’);?></span>
</a>
</li>

<?php  }else{ ?>
<li class=”level0 nav-1 contact-link level-top”>
<a href=”<?php echo Mage::getUrl(‘customer/account/login’); ?>” class=”level-top”>
<i class=”icon-login-3″></i>
<span><?php echo $this->__(‘Login’);?></span>
</a>
</li>
<?php } ?>

Please indicate: 无趣的人生也产生有意思的事件 » Magento判断用户是否登录

Hi, you must log in to comment !