You can use the customer.firstname and customer.lastname variables to only show part of the customer's name in an order template.
Here is an example of how you can modify the default Customer Account Statement 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:
<div class="billing">
<h3>Bill To</h3>
<h4>{{ customer.full_name }}</h4>
<span>
{{customer.address}}<br />
{{customer.city}}, {{customer.state}} {{ customer.zip }}
</span>
</div>
Custom Code
Replace the code in red above with the code in red below, as follows:
<div class="billing">
<h3>Bill To</h3>
<h4>{{ customer.firstname | truncate: 2, "." }} {{ customer.lastname }}</h4>
<span>
{{customer.address}}<br />
{{customer.city}}, {{customer.state}} {{ customer.zip }}
</span>
</div>
Result
Still have questions? In your DecoNetwork Admin, use the Universal Search box in the top bar to find more related help guides. Need more help? Click the icon next to the search box to open the help menu and submit a support ticket. Our Client Services team is ready to assist!
Comments
0 comments
Please sign in to leave a comment.