Jump to content

My welcome message displays wrong customer's name


tumil

Recommended Posts

Hi

So i wanted to add a welcome message in a top navigation bar on my shop. This navigation bar is from a module.

I edited module's .tpl file and added this code in front of it:

<li><b>Hi, {$customerName}! </b></li>

It works, the name is displayed. But not the right name. Customer A sees a name of the Customer B in this message. It works good only after I reset cache but when someone logs in after I clear cache, it is again displayed in a wrong way. It's obvious that I can't reset cache each time when a customer logs in. What is wrong?

Link to comment
Share on other sites

I changed it to

<li><b>Hi, {nocache}{$customerName}{/nocache}! </b></li>

And it seems to work properly. But is it the right solution? I just want to make sure it won't have any influence on caching all the others elements of my site.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...