After Login i want to replace the "My Account"(Dropdown with links) With "Hi,FirstName" post login ?
How do i do that , I am not talking about welcome message ,


In File app/design/frontend/rwd/default/template/page/html/header.phtml


 <span class=<div class="account-cart-wrapper">
                <a href="<?php echo $this->helper('customer')->getAccountUrl(); ?>" data-target-element="#header-account" class="skip-account">
                    <span class="icon"></span>"label"><?php echo $this->__('Account'); ?></span>


        <div class="account-cart-wrapper">
                <a href="<?php echo $this->helper('customer')->getAccountUrl(); ?>" data-target-element="#header-account" class="skip-account">
                    <span class="icon"></span>
        <span class="label"><?php echo $this->__('Account'); ?></span>

        <span class="label"><?php echo 'Hi, '.Mage::getSingleton('customer/session')->getCustomer()->getFirstname(); ?></span>

same page of welcome message

app/design/frontend/rwd/default/template/page/html/header.phtml line 67

 <a href="#header-account" class="skip-link skip-account">
                        <span class="icon"></span>
                        <span class="label"><?php 
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
          echo Mage::getSingleton('customer/session')->getCustomer()->getName();
        }else {echo $this->__('Account'); } ?></span>

This is my code:

<div class="switcher top-links" id="top-links">
                    <span class="name" data-mage-init='{"dropdown":{}}' data-toggle="dropdown">
                            <span><span class="hidden-sm hidden-xs"><?php echo __('My Account ')?></span><i class="fa fa-user hidden-lg hidden-md"></i><i class="fa fa-angle-down"></i></span>       
                    <ul class="menu dropdown switcher-dropdown ui-dialog-content ui-widget-content" style="display:none;" data-target="dropdown" data-mage-init='{"dropdownDialog":{
                            "triggerTarget":"#top-links > .name",
                            "closeOnMouseLeave": false,
                        <?php echo $block->getChildHtml('top.links') ?>
                <?php echo $block->getChildHtml('top.links') ?>

This is my code what should do? I want also same functionality

  • Could you provide me solution? @MaYaNk – vnnogile_user Jul 7 '16 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.