I am working on magento enterprise and we installed all patches that required.

I am facing issue with cache or session

when customer login to his/her account, Customer name display wrong on top link cart-item count order and customer profile are ok but name in top link is wrong.

I am using customize template

     $session = Mage::helper('customer');
     if($session->isLoggedIn()) {
        $customer = $session->getCustomer();
        echo "<p>".$customer->getName()."</p>";

2 Answers 2


Magento EE already has a “hole punch” in place for the logged-in customer name. It sounds like you are not using this built-in block, so double check that your current layout and template is using this block for displaying the customer name:

<block type="page/html_header" name="header" as="header">
    <block type="page/html_welcome" name="welcome" as="welcome"/>

You should see it used in your header.phtml template, something like this:

<?php echo $this->getChildHtml('welcome') ?>

Here is the placeholder that already exists to handle this block:


  • I am using customize template and customer name come from header.phtm file Commented Mar 25, 2017 at 5:08
  • 1
    @vaibhavahalpara Okay, that is the issue for sure then. See my update above; you will need to remove your custom implementation and replace it with the welcome block output. By default it will say “Welcome, $name!” but you can override that by either extending the page/html_welcome block or using the locale file to change that string to <p>%s</p>. Commented Mar 25, 2017 at 17:14

You're going to need to read up on hole punching.

Start here:

How to hole punch a child block added inside catalog/product/list block

Then this:


Familiarize yourself with the Enterprise_PageCache_* classes. You might be able to just extend some of them. Although I fixed that particular scenario you have going a while back, it was a little more involved.

I don't have any supporting code at my disposal unfortunately, but this can get you where you need to be. Its not overly difficult once you get into it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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