You can use the customer.firstname and customer.lastname variables to only show part of the customer's name in the emails sent to the customer.
Here is an example of how you can modify the default User-Registration Email Template to only show the initial of the customer's first name, followed by their last name:
Default Code
Code to be modified highlighted in red:
Dear {{customer.full_name}}, <br/>
<br/>
Your login credentials are:<br/><br/>
Username: {{ customer.login }}<br/>
Password: {{ password }}<br/>
Custom Code
Replace the code in red above with the code in red below, as follows:
Dear {{ customer.firstname | truncate: 2, "." }} {{ customer.lastname }}, <br/>
<br/>
Your login credentials are:<br/><br/>
Username: {{ customer.login }}<br/>
Password: {{ password }}<br/>
Result
Still have questions? Use the Search Tool at the top of the page to find more related guides. Need help? Click the icon to submit a support ticket – our Client Services team is ready to assist!
Comments
0 comments
Please sign in to leave a comment.