How to add login link beside welcome message in magento 1.7 -



How to add login link beside welcome message in magento 1.7 -

i'm trying move "login" link in toplinks beside default welcome message.c:\xampp\htdocs\myhealthzone\app\design\frontend\default\myhealth\template\page\html\header.phtml in gave code

<p class="welcome-msg"> <?php echo $this->__('hi %s', mage::getsingleton('customer/session')->getcustomer()->getfirstname()); ?> <?php echo $this->getadditionalhtml() ?> </p>

but session use. please update me how login link here instead of session.

try this:

<p class="welcome-msg"> <?php $helper = mage::helper('customer'); ?> <?php if ($helper->isloggedin() : ?> <?php echo $this->__('hi %s', mage::getsingleton('customer/session')->getcustomer()->getfirstname()); ?> <?php else :?> <a href="<?php echo $helper->getloginurl(); ?>"><?php echo $this->__('login');?></a> <?php endif; ?> <?php echo $this->getadditionalhtml() ?> </p>

magento

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -