Forums / Templates, Stylesheets, Page Layout / Using Customer's Name Throughout the Site Like the Login Page

Using Customer's Name Throughout the Site Like the Login Page

Locked

Views: 634

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
1 Sep 2009, 5:05 PM
#1
greengreetings avatar

greengreetings

Zen Follower

Join Date:
May 2009
Location:
Virginia
Posts:
90
Plugin Contributions:
0

Using Customer's Name Throughout the Site Like the Login Page

When customers log in they see a message like:
Hello [customer's name]! Would you like to see our newest additions?

How can I use the customer's name throughout the site on different pages?

What are the PHP variables and where do I put them? I would love to do this. I think it would really customize the user's experience. I hope someone has the answer.

1 Sep 2009, 6:59 PM
#2
greengreetings avatar

greengreetings

Zen Follower

Join Date:
May 2009
Location:
Virginia
Posts:
90
Plugin Contributions:
0

Re: Using Customer's Name Throughout the Site Like the Login Page

I found the solution to my problem. I asked a friend of mine and he showed me this PHP code:

<?php  echo $_SESSION['customer_first_name']?>

Which is in the languages/english/index.php file. Now, I can use the customer's name throughout the site. I can say:

Thank you <?php echo $_SESSION['customer_first_name']?>. But this only works if the person has logged in. :clap: