# E-Mail Templates

In order to show your customers the voucher code in the mail template after purchasing a voucher, the mail template must be expanded.

Under "Settings> Shop> E-Mail Templates" you will find the template "Order confirmation". Here you expand the text and the HTML block with the following scripts.

# Text / Plain

{% if order.extensions and order.extensions.netiEasyCouponPurchaseVouchers is defined  %}
{% if order.extensions.netiEasyCouponPurchaseVouchers|length is same as(1) %}Information about the purchased voucher:
{% else %}Information about the purchased vouchers:
{% endif %}

{% if order.extensions.netiEasyCouponPurchaseVouchers|length is same as(1) %}The voucher can only be redeemed after the order has been paid.
Your vouchers can also be found in your account.
{% else %}The vouchers can only be redeemed after the order has been paid.
Your vouchers can also be found in your account.
{% endif %}

{% for purchaseVoucher in order.extensions.netiEasyCouponPurchaseVouchers %}Article: {{ purchaseVoucher.product.translated.name }}
Code: {{ purchaseVoucher.code }}
Value: {{ (purchaseVoucher.value * purchaseVoucher.currencyFactor) | number_format(purchaseVoucher.currency.decimalPrecision) }} {{ purchaseVoucher.currency.symbol }}

{% endfor %}
{% endif %}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# HTML

{% if order.extensions and order.extensions.netiEasyCouponPurchaseVouchers is defined %}
    {% if order.extensions.netiEasyCouponPurchaseVouchers|length is same as(1) %}
        Information about the purchased voucher:<br />
    {% else %}
        Information about the purchased vouchers:<br />
    {% endif %}
    <br />
    {% if order.extensions.netiEasyCouponPurchaseVouchers|length is same as(1) %}
        The voucher can only be redeemed after the order has been paid.<br />
        Your vouchers can also be found in your account.<br />
    {% else %}
        The vouchers can only be redeemed after the order has been paid.<br />
        Your vouchers can also be found in your account.<br />
    {% endif %}
    <br />
    {% for purchaseVoucher in order.extensions.netiEasyCouponPurchaseVouchers %}
        Article: {{ purchaseVoucher.product.translated.name }}<br />
        Code: {{ purchaseVoucher.code }}<br />
        Value: {{ (purchaseVoucher.value * purchaseVoucher.currencyFactor) | number_format(purchaseVoucher.currency.decimalPrecision) }} {{ purchaseVoucher.currency.symbol }}<br /><br />
    {% endfor %}
{% endif %}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21