Customer name when logged in not email?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hello,

I have been trying to figure out how to change what is displayed in the header or the my accounts area at the top of the screen when a customer is logged in.
Currently, when someone is logged in it displays their email address. I would like it to display their name.

CURRENTLY:
[email protected] | Log out | Shopping Cart (2) | Wishlist (0)

WHAT I WOULD LIKE:
John Smith | Log out | Shopping Cart (2) | Wishlist (0)
12 years ago
Go to Admin area > Configuration > Global Settings > Customer profiles tab. Set 'Customer name format' to 'Show full names'
12 years ago
I made the change above and even cleared the cache on the site but nothing changed. I also made sure to uncheck the box for allow user names.
Any ideas why this isn't working?
12 years ago
Ohh, it works fine for all other pages (forums posts, news comments, etc). But the full name is not shown in the header. Follow the next steps in order to display names:
1. Open \Modules\Header.ascx file
2. Replace "<%=Page.User.Identity.Name %>" with "NopContext.Current.User.FormatUserName()"

P.S. It didn't test it. But it should work
12 years ago
That worked perfect! Thank you so much for your help and excellent product!
12 years ago
Hi Andrei,
  with your suggested code, the page is showing the full name (Fistname LastName). Is there any setting to display only First name instead of Full name?

Thanks,
Prasad.
12 years ago
03060 wrote:
Hi Andrei,
  with your suggested code, the page is showing the full name (Fistname LastName). Is there any setting to display only First name instead of Full name?

Thanks,
Prasad.


Andrei, that would be great. can we do that?

Thanks,
Amit.
12 years ago
03060 wrote:
with your suggested code, the page is showing the full name (Fistname LastName). Is there any setting to display only First name instead of Full name?

In this case use the following code "NopContext.Current.User.FirstName"
12 years ago
Works perfect! Thank you Andrei!
12 years ago
Sorry for my ignorance, can someone explain this for version 2.3?

Logging in with email address but displaying only first name in the header and blog comments.

Thanks,
Shawn
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.