Jump to content

[solved] How to say "Hi, {firstname}!"?


Guest

Recommended Posts

Hey guys,

 

Is there any code available to insert the person's first name for a greeting that I can insert into text on a tpl document?

 

Thanks in advance! :)

 

eggo

Link to comment
Share on other sites

You can use customer first name only when the customer is logged in your store.

to achieve this you have to use context object.

 

{assign var=context value=Context::getContext()}
Hi {$context->customer->firstname} !

 

Now you've got access to other context variables like customer email, lastname, language etc.

awesome, don't you think?

  • Like 2
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...