Vouchers: Use Case

Displaying a discount

For this example, we access the Summer Sale voucher pool. This example voucher pool is valid from 01.07.2018 until 30.08.2018 and offers EUR 30.00 discounts to all shop visitors that make orders over EUR 200.00 in the category Summer Sale.

To display the voucher pool's validity dates in our preferred dd/mm/yyyy format, we will use the date formatting function.

{{#voucherPool '{"name": "Summer Sale Discount"}'}}

Use {{code}} to save {{value}} {{currency}} on your next order! 
(valid {{computeDate '{"dateTrait": "validFrom", "outputFormat": "dd/MM/yyyy"}'}}
until {{computeDate '{"dateTrait": "validTo", "outputFormat": "dd/MM/yyyy"}'}})
*Only valid for purchases over {{minBasket}} {{currency}}. 
Terms and conditions apply: {{conditions}}

{{/voucherPool}}

Once the function is evaluated, it displays the following text in the section where it is used in the message:

Use SD30Sdjat77 to save 30.0 EUR on your next order! 
(valid from 01/07/2018 until 30/08/2018)
*Only valid for purchases over 200.0 EUR.

Terms and conditions apply:
- This voucher is only valid for purchases made in our Summer Sale category.
- A voucher can only be used once. 
- The voucher is non-transferable.
- This voucher must be redeemed on our website, applying it during the checkout process.

Last updated