You can show the code of a coupon used in an order by using the order.coupon.code variable in the Order Template.
Here is an example of how you can modify the default Order Template to show the coupon code if a coupon is used in an order:
Default Code
{% if order.uses_coupon? %}
<tr>
<td class="heading">Coupon Discount</td>
<td class="qty">{{ order.coupon_discount_inc_tax | simple_price_format }}</td>
</tr>
{% endif %}
Custom Code
Add the code in red to the default code shown above as follows:
{% if order.uses_coupon? %}
<tr>
<td class="heading">Coupon Discount ({{ order.coupon.code }})</td>
<td class="qty">{{ order.coupon_discount_inc_tax | simple_price_format }}</td>
</tr>
{% endif %}
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.