Skip to main content
By default, the shop accepts one voucher per order. With this extension, it accepts up to ten. As soon as the customer has redeemed the first number, another input field appears. The ten are made up of the first voucher and nine additional ones. This split runs through the entire implementation: the first voucher is addressed in the template as before, while the nine additional ones are contained in a loop. Screen Multivoucher

Which vouchers can be combined

Not every type of voucher can be combined. The following can currently be combined:
In this combination, a promotional voucher with a fixed amount applies to all products without exception. The usual exclusion of products not eligible for promotional vouchers does not apply here. Check this if you have price-fixed goods in your product range.
Whether two specific vouchers are compatible can additionally be controlled per voucher. Using the special function for combinability, vouchers can be marked as exclusive or linked to each other via allow and block lists. If this check fails, rejection reason 27 appears.
Guide: Percentage vouchers

Prerequisite

The voucher generator must be activated. Contact your WEBSALE representative to arrange this.
If the vouchers come from an external system and are therefore not in WEBSALE format, add the entry ExternalVouchers-Allow = yes in the <Voucher-Txt> section of the shop.config.

Step 1: Enable the function in test mode

The setup deliberately runs in two stages. First set the switch to test; the function then only takes effect in the shop’s test mode, and nothing changes for real customers.
MultiVoucher-MinOrderBehavior determines how strict the promotion is. Three vouchers with a minimum order value of 50 euros each require a basket over 150 euros with the default setting; with UseMax, 50 euros is enough. This is the lever that determines the economic framework of a multi-voucher promotion.
Disabling is trickier than enabling. A running session that already contains several codes would end up in an inconsistent state if the function were disabled. The shop therefore only applies the switch to no to sessions in which no additional voucher has been entered yet. Existing sessions with multiple codes continue with the old setting.
Reference: Voucher-Txt section

Step 2: Set up the input fields

The first voucher remains unchanged; the additional ones go into the VOUCHER-MultiVoucher loop.
The loop contains only the additional vouchers, not the first one. If you want to display all entered numbers, you have to place the tag twice, once outside and once inside the loop. This split is the most common source of errors with this extension.
Inside the loop, the voucher-related tags refer to the voucher of the respective iteration. This applies to all VOUCHER- tags that read voucher data, for example VOUCHER-DataExists, VOUCHER-Number and VOUCHER-ChargeID, and additionally to BASKET-VoucherRest, BASKET-VoucherDeleteLink, BASKET-VoucherNotApplicable, BASKET-PR-VoucherApplies and ST-Voucher_OK.
You output the values of the additional vouchers following the same pattern.
Reference: WS-VoucherNumber_input · WS-VoucherNumber · ST-Voucher_checked · BT-Voucher_delete · BT-Voucher · VOUCHER-MultiVoucher · BASKET-VoucherDiscount

Step 3: Add the two new error messages

With multiple vouchers, two rejection reasons are added that could not occur before. Add both wherever you have integrated the voucher entry.
Reference: MSG-Voucher_error

Step 4: Test in test mode

Open the shop in test mode and redeem various combinable vouchers.
Check not only that multiple codes are accepted, but also the totals. The interaction between percentage and fixed-amount vouchers and the rounding in particular can only be assessed using real figures.
Guide: Enabling/disabling the shop’s test modes

Step 5: Go live

Set the switch to yes and remove any wrappers you added to the templates for testing.

Showing percentage and fixed-amount vouchers separately

Percentage vouchers are already included in the subtotal, whereas fixed-amount vouchers are only deducted from it afterwards. The customer cannot tell this if both appear on one line. Both types can therefore be output separately, and the sections only appear if the respective type actually exists. Multivoucher Prozentuale Absolute Getrennt

Percentage vouchers at the subtotal

The pattern repeats twice, once for the first voucher and once in the loop. VOUCHER-AmountType_isPercent ensures that only percentage vouchers appear in this block.

Fixed-amount vouchers below

Showing the total savings (optional)

Price formatting must be switched off for the calculation. Otherwise, the amounts go into the addition with thousands separators and decimal commas, and the result is wrong. Switch it back on immediately afterwards so that the formatting is retained in the rest of the template.
Reference: BASKET-SubTotalSum · BASKET-PercentalVoucherDiscountSum · BASKET-PercentalVoucherDiscount · BASKET-VoucherDiscountSum · VOUCHER-AmountType_isPercent · VOUCHER-AmountType_isAbsolute · WS-DisablePriceAndNumberFormat · DC-CommercialCalc1_set
  • Guide: Offering vouchers: Overview
  • Guide: Providing voucher entry
  • Guide: Percentage vouchers
  • Guide: Enabling/disabling the shop’s test modes