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/>
Comments
0 comments
Please sign in to leave a comment.