Customer name when logged in not email?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 12 años
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)
Hace 12 años
Go to Admin area > Configuration > Global Settings > Customer profiles tab. Set 'Customer name format' to 'Show full names'
Hace 12 años
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?
Hace 12 años
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
Hace 12 años
That worked perfect! Thank you so much for your help and excellent product!
Hace 12 años
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.
Hace 12 años
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.
Hace 12 años
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"
Hace 12 años
Works perfect! Thank you Andrei!
Hace 12 años
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.