Skip to main content
A voucher is more than an amount. It has a validity period, may only apply to certain products, only to certain customers, only in certain subshops, can be redeemed a limited number of times and may not be compatible with other vouchers. All of this is defined by the voucher generator in the online service area, and all of this can be read out in the template. The VOUCHER- tags access these fields. They answer two different questions: what about the voucher the buyer has just redeemed, and what is behind any given voucher number. Guide: Offering vouchers

The one rule that applies to all tags

Every tag on this page needs a voucher to refer to. There are exactly two ways to provide one.
Outside these two ranges, all tags have no effect. The only exceptions are VOUCHER-LoadData() itself and VOUCHER-DataExists, which set up the frame in the first place, as well as the four tags for meta vouchers, which refer to the session.
The previous documentation repeats this rule on every single tag page. On the new page, it is stated once here, and the sections below only point out deviations.

Loading a voucher

VOUCHER-LoadData() loads a voucher by its number. The argument supports tag-in-tag.
VOUCHER-LoadData() always applies, even if the number does not exist at all. Only VOUCHER-DataExists tells you whether the voucher exists. This behaves exactly like PR-LoadData() for products. If you omit the check, a made-up number shows a page full of empty fields.
The voucher is loaded regardless of whether the buyer could currently redeem it. An expired or already used-up voucher can therefore still be displayed this way. That is exactly the purpose, for example for a “Your voucher” status page.

Number, batch and currency

A voucher can carry several batch labels. VOUCHER-ChargeLabel then outputs them as a comma-separated list. The selection list is in the ChargeLabelValues section of global.config, and the ChargeLabel section lets you make the entry mandatory.
In the shop system, the batch ID always counts as a label, even if the creator has not assigned one. This is important for the compatibility check further below, because it means every voucher has at least one label.

Value and deduction type

First the question of how the voucher calculates, then the question of how much. VOUCHER-AmountType_code outputs the same code as a number.
All value tags also work as bracketing, namely when a value is stored. For a percentage voucher, VOUCHER-Value_absoluteamount is empty and vice versa. So first query the deduction type and output the matching value within it.
The deduction of the set sub-product price is a special case for set products. A maximum amount cannot be set additionally in this case. Your contact at WEBSALE AG can advise you on this voucher type.

Validity and redemption limits

The two counters only make sense within {VOUCHER-MaxRedeemable}. Without a defined maximum number, there is nothing to count, and the bracketing does not apply in that case anyway.
VOUCHER-ValidInSubhops_list returns a raw list. The DC- tags let you split it into individual entries.

How far away the minimum order value still is

Three more tags do not refer to the voucher but to the current basket.
These three tags are available in the shop system but are not described in the previous documentation. They make the difference between “voucher cannot be redeemed” and “twelve euros still missing”, and the latter sells better.
The three work only within {ST-Voucher_OK} and in the multiple voucher loop. Within {VOUCHER-LoadData()}, they deliberately output nothing, because there the voucher is not necessarily part of the current process and a distance to the basket cannot be calculated.
The values already come in the shop’s number format. You add the currency symbol yourself.

The voucher types

VOUCHER-Type_code outputs the type as a number, eight bracketings query it individually.
Codes 0 to 6 combine three characteristics: individual or universal voucher, remaining amount usable or expiring, and whether login is required. Codes 3 to 6 require a logged-in customer.
Type 7 is the special case: this voucher can be redeemed multiple times but binds itself on first redemption to the account that used it first. After that, it is blocked for other accounts. VOUCHER-BoundUserIndex tells you which account.
The source page for VOUCHER-BoundUserIndex breaks off mid-sentence. The tag outputs the user index to which the voucher is bound and works as bracketing if a binding exists. This lets you distinguish for a type 7 voucher whether it is still free or already assigned.

Promotional voucher or purchased voucher

VOUCHER-CampaignType_code outputs the code as a number.

Product and category filters

Three bracketings tell you whether and how a filter is set, a loop lists the rules.
A filter can contain including and excluding rules at the same time. That is why the distinction exists twice: once at voucher level as _active_onlyValidFor and _active_notValidFor, and once per rule as _data_type_isOnlyValidFor and _data_type_isNotValidFor.
The source page for VOUCHER-CatProdFilter_data_index_code names the loop as a prerequisite in the explanatory text but specifies the general range as the permitted location. The loop is correct, as with all other _data_ tags.

Set products in the filter

VOUCHER-CatProdFilter_SetBehavior outputs the code as a number.

Customer filter

Same structure as the product filter, only with customers instead of products.
Pay attention to the numbers: for the customer filter, the code list starts at 0, for the product filter at 1. The two lists look the same but count differently.

Added products

A voucher can add products to the basket, for example a free gift.
The source page for VOUCHER-VoucherProducts_active names the {@VOUCHER-CustomerFilter_data} loop as the permitted location. This has obviously been copied from the customer filter. The tag applies in the usual frame, like the other bracketings at voucher level.

Multiple currencies

If a voucher is stored for several currencies, five tags output the values in a technical format that can be split with the DC- tags.
The currency list comes in the first form, all others in the second with currency and amount per group. To split them, use DC-DynamicLoopX_setSeparatorTags() and DC-DynamicLoopX_settaggedData(), and for the amount groups additionally DC-FPX_extractTaggedData().
For a multi-currency voucher, the simple tags such as VOUCHER-Value_absoluteamount return the value in the currency of the current process. You only need the multi-currency tags if you want to show all currencies at once.
Reference: DC- (Data conversion)

Special functions

These bracketings tell you which additional rules apply to the voucher.
VOUCHER-SpecialFeatures, _DisableOtherDiscounts and _DisableAutoBasket are available in the shop system but are not described in the previous documentation. The first is suitable as a frame around the entire block of special notices.
_DisableOtherDiscounts needs explaining to the buyer. Anyone who has a customer discount and redeems this voucher loses the discount for this order. Point this out in the template, otherwise questions will arise.

Dependency on stock level

Dependency on free product data fields

A voucher can be tied to a free product data field containing a certain value. The same check also exists in the opposite direction as an exclusion.
The same five tags exist with Negative after AddProdFieldsFilter, that is VOUCHER-SpecialFeatures_AddProdFieldsFilterNegative and so on. They describe items for which the voucher does not apply. These five are available in the shop system but are not described in the previous documentation.

Several vouchers at once

If the multiple voucher function is enabled, the buyer can enter additional vouchers. VOUCHER-MultiVoucher loops over them.
As a single tag, VOUCHER-MultiVoucher outputs the number of additional vouchers. The first one entered does not count; it is located outside the loop.
The loop runs over the additional vouchers and appends an empty iteration as long as the maximum number has not been reached, a valid voucher is present and all entered vouchers have been checked and are valid. This empty iteration is the input field for the next voucher.

Are the vouchers compatible

The shop system decides via labels whether two vouchers can be redeemed together. Each voucher has its own labels, plus an inclusion list and an exclusion list.
These seven tags are available in the shop system but are not described in the previous documentation. Without them, you cannot explain to a buyer why their second voucher was rejected.
Exclusive means: the same label is in both the inclusion list and the exclusion list. Such a voucher is not compatible with any other voucher from this group.
As a single tag, VOUCHER-SpecialFeatures_Compatibility_notCompatible outputs the number of the respective other voucher and, as a loop, runs over all incompatible ones. The error code next to it is a technical number without a label. Do not show it to the buyer in raw form; translate it in the template.

Meta vouchers

A meta voucher is a collective code behind which several individual vouchers stand. If the buyer enters the collective code, the shop system redeems all the vouchers behind it at once.
The two source pages for VOUCHER-IsFromMeta and VOUCHER-MetaShowAsBlock have no type specification at all. Both are pure bracketings; they exist neither as single tags nor as loops.
VOUCHER-MetaSubCount counts the successfully redeemed individual vouchers, not the stored ones. If some of them had expired or were used up, the number is smaller than configured in the collective code. Word the text accordingly.
Only one collective code can be redeemed at a time. Which individual vouchers stand behind it is defined in a configuration file of the shop, not in the voucher generator.
VOUCHER-MetaShowAsBlock controls the display. The value comes from the data of the collective code, and if it is missing there, the setting from the shop configuration applies. With this bracketing, you show the individual vouchers either as one block or listed individually.
The four meta tags refer to the session and not to a loaded voucher. They are therefore the only tags on this page that also work outside {VOUCHER-LoadData()} and {ST-Voucher_OK}. Within the multiple voucher loop, VOUCHER-IsFromMeta additionally accesses the respective voucher.

The tags at a glance

All tags are permitted on all templates. What matters is not the template but the frame provided by {VOUCHER-LoadData()} or {ST-Voucher_OK}, as described at the beginning of this page.
  • Guide: Offering vouchers
  • Reference: ST-Voucher_OK and ST-Voucher_checked on the page ST- (Page state)
  • Reference: BT-Voucher and BT-Voucher_delete on the page BT- (Buttons)
  • Reference: WS-VoucherNumber and WS-VoucherNumber_input on the page WS- (General tags)
  • Reference: DC- (Data conversion)