> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# VOUCHER- (Voucher)

> Output all properties of a voucher in the template: value and deduction type, validity and redemption limits, voucher types, product and customer filters, multiple currencies, special functions and meta vouchers.

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.

| Context | Refers to |
| - | - |
| within `{ST-Voucher_OK}` | the voucher the buyer has redeemed |
| within `{VOUCHER-LoadData()}` | the voucher whose number is in the argument |

> [!WARNING]
>
> 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.

> [!NOTE]
>
> 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.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{VOUCHER-LoadData(1234)}
   {VOUCHER-DataExists}
      <p>Gutschein ~VOUCHER-Number~ über ~VOUCHER-Value_absoluteamount~ ~VOUCHER-CurrencyCode~</p>
   {/VOUCHER-DataExists}

   {!VOUCHER-DataExists}
      <p>Diese Gutscheinnummer kennen wir nicht.</p>
   {/!VOUCHER-DataExists}
{/VOUCHER-LoadData(1234)}
```

> [!WARNING]
>
> `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.

> [!NOTE]
>
> 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

| Tag | Returns |
| - | - |
| `VOUCHER-Number` | the voucher number |
| `VOUCHER-ChargeID` | the batch ID |
| `VOUCHER-ChargeLabel` | the batch labels, comma-separated |
| `VOUCHER-ChargeCreator` | the name of the creator in the online service area |
| `VOUCHER-CurrencyCode` | the three-letter ISO currency code |

> [!NOTE]
>
> 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.

> [!WARNING]
>
> 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**.

| Tag | Code | Meaning |
| - | - | - |
| `VOUCHER-AmountType_isAbsolute` | 0 | fixed amount |
| `VOUCHER-AmountType_isPercent` | 1 | percentage |
| `VOUCHER-AmountType_isCappedSetChildPosition` | 2 | deduction of the set sub-product price |

`VOUCHER-AmountType_code` outputs the same code as a number.

| Tag | Returns |
| - | - |
| `VOUCHER-Value_absoluteamount` | the fixed amount |
| `VOUCHER-Value_absoluteamount_left` | the remaining amount still available |
| `VOUCHER-Value_percent` | the percentage |
| `VOUCHER-Value_cappedsetchildpositionamount` | the deduction for the set sub-product |
| `VOUCHER-MaxDiscountValue` | the maximum amount for a percentage voucher |
| `VOUCHER-VATIndex` | the index of the VAT rate |
| `VOUCHER-VATRate` | the VAT rate |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{VOUCHER-AmountType_isAbsolute}
   <p>~VOUCHER-Value_absoluteamount~ ~VOUCHER-CurrencyCode~ Gutschrift</p>
   {VOUCHER-Value_absoluteamount_left}
      <p>Davon sind noch ~VOUCHER-Value_absoluteamount_left~ ~VOUCHER-CurrencyCode~ offen.</p>
   {/VOUCHER-Value_absoluteamount_left}
{/VOUCHER-AmountType_isAbsolute}

{VOUCHER-AmountType_isPercent}
   <p>
      ~VOUCHER-Value_percent~ Prozent Rabatt
      {VOUCHER-MaxDiscountValue}, höchstens ~VOUCHER-MaxDiscountValue~ ~VOUCHER-CurrencyCode~{/VOUCHER-MaxDiscountValue}
   </p>
{/VOUCHER-AmountType_isPercent}
```

> [!NOTE]
>
> 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.

> [!NOTE]
>
> 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

| Tag | Returns |
| - | - |
| `VOUCHER-ValidFrom_date` | the date from which the voucher is valid |
| `VOUCHER-ValidFrom_unixtimestamp` | the same point in time as a Unix timestamp |
| `VOUCHER-ValidUntil_date` | the date until which it is valid |
| `VOUCHER-ValidUntil_unixtimestamp` | the same point in time as a Unix timestamp |
| `VOUCHER-ValidInSubhops_list` | the subshops as a comma-separated list |
| `VOUCHER-MinOrder_Value` | the minimum order value |
| `VOUCHER-MaxRedeemable` | how often the voucher can be redeemed in total |
| `VOUCHER-MaxRedeemable_Redeemed` | how often it has already been redeemed |
| `VOUCHER-MaxRedeemable_Remaining` | how often it can still be redeemed |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{VOUCHER-MaxRedeemable}
   {VOUCHER-MaxRedeemable_Remaining}
      <p>Dieser Gutschein kann noch ~VOUCHER-MaxRedeemable_Remaining~-mal eingelöst werden.</p>
   {/VOUCHER-MaxRedeemable_Remaining}
   {!VOUCHER-MaxRedeemable_Remaining}
      <p>Dieser Gutschein ist aufgebraucht.</p>
   {/!VOUCHER-MaxRedeemable_Remaining}
{/VOUCHER-MaxRedeemable}
```

> [!WARNING]
>
> 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.

> [!NOTE]
>
> `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.

| Tag | Returns |
| - | - |
| `VOUCHER-MinOrder_Base` | the merchandise value credited for this voucher |
| `VOUCHER-MinOrder_Remaining` | how much is still missing to reach the minimum order value |
| `VOUCHER-MinOrder_NotReached` | Bracketing: the minimum order value has not been reached |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{VOUCHER-MinOrder_NotReached}
   <p>
      Für diesen Gutschein fehlen noch ~VOUCHER-MinOrder_Remaining~ ~WS-Currency~
      bis zum Mindestbestellwert von ~VOUCHER-MinOrder_Value~ ~WS-Currency~.
   </p>
{/VOUCHER-MinOrder_NotReached}
```

> [!NOTE]
>
> 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.

> [!WARNING]
>
> 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.

> [!NOTE]
>
> 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.

| Code | Type | Bracketing |
| - | - | - |
| 0 | individual voucher, remaining amount usable | `VOUCHER-Type_isStandard_RemainderReusable` |
| 1 | individual voucher, remaining amount expires | `VOUCHER-Type_isStandard_RemainderExpires` |
| 2 | universal voucher without restriction | `VOUCHER-Type_isUniversal_NoRestrictions` |
| 3 | universal voucher, once per customer | `VOUCHER-Type_isUniversal_OncePerCustomer` |
| 4 | universal voucher, new customers only | `VOUCHER-Type_isUniversal_NewCustomersOnly` |
| 5 | individual voucher, remaining amount usable, new customers only | `VOUCHER-Type_isStandard_RemainderReusable_NewCustomersOnly` |
| 6 | individual voucher, remaining amount expires, new customers only | `VOUCHER-Type_isStandard_RemainderExpires_NewCustomersOnly` |
| 7 | individual multiple-use voucher | `VOUCHER-Type_isUniversal_customerBinding` |

> [!NOTE]
>
> 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.

> [!NOTE]
>
> 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.

> [!WARNING]
>
> 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

| Tag | Code | Meaning |
| - | - | - |
| `VOUCHER-CampaignType_isCampaign` | 1 | promotional voucher, only valid for certain products |
| `VOUCHER-CampaignType_isRegular` | 2 | purchased voucher, valid for all products |

`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.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{VOUCHER-CatProdFilter_active}
   {VOUCHER-CatProdFilter_active_onlyValidFor}<h3>Gilt nur für:</h3>{/VOUCHER-CatProdFilter_active_onlyValidFor}
   {VOUCHER-CatProdFilter_active_notValidFor}<h3>Gilt nicht für:</h3>{/VOUCHER-CatProdFilter_active_notValidFor}

   <ul>
      {@VOUCHER-CatProdFilter_data}
         <li>
            ~VOUCHER-CatProdFilter_data_index~
            {VOUCHER-CatProdFilter_data_index_isCatIndex}(Kategorie){/VOUCHER-CatProdFilter_data_index_isCatIndex}
            {VOUCHER-CatProdFilter_data_index_isProdIndex}(Produkt){/VOUCHER-CatProdFilter_data_index_isProdIndex}
            {VOUCHER-CatProdFilter_data_index_isProdNumber}(Artikelnummer){/VOUCHER-CatProdFilter_data_index_isProdNumber}
            {VOUCHER-CatProdFilter_data_type_isWildCard}mit Platzhalter{/VOUCHER-CatProdFilter_data_type_isWildCard}
         </li>
      {/@VOUCHER-CatProdFilter_data}
   </ul>
{/VOUCHER-CatProdFilter_active}
```

| Tag | Meaning | Located in |
| - | - | - |
| `VOUCHER-CatProdFilter_active` | Bracketing: a filter is set | standard |
| `VOUCHER-CatProdFilter_active_onlyValidFor` | Bracketing: inclusion list | standard |
| `VOUCHER-CatProdFilter_active_notValidFor` | Bracketing: exclusion list | standard |
| `VOUCHER-CatProdFilter_data` | count, bracketing and loop over the rules | standard |
| `VOUCHER-CatProdFilter_data_index` | the identifier of the rule | `{@…_data}` |
| `VOUCHER-CatProdFilter_data_index_code` | 1 category, 2 product index, 3 item number | `{@…_data}` |
| `VOUCHER-CatProdFilter_data_index_isCatIndex` | Bracketing: category index | `{@…_data}` |
| `VOUCHER-CatProdFilter_data_index_isProdIndex` | Bracketing: product index | `{@…_data}` |
| `VOUCHER-CatProdFilter_data_index_isProdNumber` | Bracketing: item number | `{@…_data}` |
| `VOUCHER-CatProdFilter_data_type_isOnlyValidFor` | Bracketing: this rule includes | `{@…_data}` |
| `VOUCHER-CatProdFilter_data_type_isNotValidFor` | Bracketing: this rule excludes | `{@…_data}` |
| `VOUCHER-CatProdFilter_data_type_isWildCard` | Bracketing: the identifier contains wildcards | `{@…_data}` |

> [!NOTE]
>
> 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`.

> [!WARNING]
>
> 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

| Tag | Code | Meaning |
| - | - | - |
| `VOUCHER-CatProdFilter_SetBehavior_AsUnit` | 0 | consider set products as a unit |
| `VOUCHER-CatProdFilter_SetBehavior_Single` | 1 | consider set products individually |

`VOUCHER-CatProdFilter_SetBehavior` outputs the code as a number.

## Customer filter

Same structure as the product filter, only with customers instead of products.

| Tag | Meaning | Located in |
| - | - | - |
| `VOUCHER-CustomerFilter_active` | Bracketing: the voucher only applies to certain customers | standard |
| `VOUCHER-CustomerFilter_data` | count, bracketing and loop | standard |
| `VOUCHER-CustomerFilter_data_index` | the identifier of the customer | `{@…_data}` |
| `VOUCHER-CustomerFilter_data_index_code` | 0 user index, 1 customer number | `{@…_data}` |
| `VOUCHER-CustomerFilter_data_index_isUserIndex` | Bracketing: user index | `{@…_data}` |
| `VOUCHER-CustomerFilter_data_index_isCustomerNumber` | Bracketing: customer number | `{@…_data}` |

> [!WARNING]
>
> 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.

| Tag | Meaning | Located in |
| - | - | - |
| `VOUCHER-VoucherProducts_active` | Bracketing: the voucher adds products | standard |
| `VOUCHER-VoucherProducts_data` | count, bracketing and loop | standard |
| `VOUCHER-VoucherProducts_data_prodnumber` | the item number | `{@…_data}` |

> [!WARNING]
>
> 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.

| Tag | Returns |
| - | - |
| `VOUCHER-MultiCurrency_CurrenciesData` | the valid currencies |
| `VOUCHER-MultiCurrency_AbsoluteAmountData` | the voucher values per currency |
| `VOUCHER-MultiCurrency_AbsoluteAmountUsedData` | the amounts already redeemed per currency |
| `VOUCHER-MultiCurrency_MaxDiscountData` | the maximum amounts per currency |
| `VOUCHER-MultiCurrency_MinOrderData` | the minimum order values per currency |

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<c>EUR</c><c>CHF</c>
<g><c>EUR</c><a>10.00</a></g><g><c>CHF</c><a>12.00</a></g>
```

> [!NOTE]
>
> 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()`.

> [!NOTE]
>
> 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.

| Tag | Applies when |
| - | - |
| `VOUCHER-SpecialFeatures` | any special function is set at all |
| `VOUCHER-SpecialFeatures_FreeShipping` | the voucher grants free shipping |
| `VOUCHER-SpecialFeatures_ValidOnlyForApp` | it can only be redeemed in the app |
| `VOUCHER-SpecialFeatures_RejectForUserAccountsWithDiscountOrDiscountList` | it is blocked for customers with their own discount |
| `VOUCHER-SpecialFeatures_DisableOtherDiscounts` | it overrides other discounts |
| `VOUCHER-SpecialFeatures_DisableAutoBasket` | it prevents the automatic basket |
| `VOUCHER-SpecialFeatures_InventoryState` | it depends on the stock level |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{VOUCHER-SpecialFeatures_FreeShipping}
   <p>Mit diesem Gutschein liefern wir versandkostenfrei.</p>
{/VOUCHER-SpecialFeatures_FreeShipping}
```

> [!NOTE]
>
> `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.

> [!WARNING]
>
> `_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

| Tag | Returns |
| - | - |
| `VOUCHER-SpecialFeatures_InventoryState_ValueList` | the stock states `green`, `yellow` and `red` for which the voucher applies |
| `VOUCHER-SpecialFeatures_InventoryState_SetBehavior` | 0 for set products as a unit, 1 for individually |

### 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.

| Tag | Meaning |
| - | - |
| `VOUCHER-SpecialFeatures_AddProdFieldsFilter` | Bracketing: the voucher depends on product data fields |
| `VOUCHER-SpecialFeatures_AddProdFieldsFilter_SetBehavior` | 0 for set products as a unit, 1 for individually |
| `VOUCHER-SpecialFeatures_AddProdFieldsFilter_Filter` | count, bracketing and loop over the checks |
| `VOUCHER-SpecialFeatures_AddProdFieldsFilter_Filter_FieldName` | the technical field name |
| `VOUCHER-SpecialFeatures_AddProdFieldsFilter_Filter_ValueInList` | the value that must be in the field |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{VOUCHER-SpecialFeatures_AddProdFieldsFilter}
   <p>Dieser Gutschein gilt für Artikel mit folgenden Merkmalen:</p>
   <ul>
      {@VOUCHER-SpecialFeatures_AddProdFieldsFilter_Filter}
         <li>
            ~VOUCHER-SpecialFeatures_AddProdFieldsFilter_Filter_FieldName~
            enthält ~VOUCHER-SpecialFeatures_AddProdFieldsFilter_Filter_ValueInList~
         </li>
      {/@VOUCHER-SpecialFeatures_AddProdFieldsFilter_Filter}
   </ul>
{/VOUCHER-SpecialFeatures_AddProdFieldsFilter}
```

> [!NOTE]
>
> 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.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{VOUCHER-MultiVoucher}
   {@VOUCHER-MultiVoucher}
      <input type="text" name="~WS-VoucherNumber_input~" value="~WS-VoucherNumber~">
      {ST-Voucher_checked}
         <button type="submit" name="~BT-Voucher_delete~">Gutschein löschen</button>
      {/ST-Voucher_checked}
      {!ST-Voucher_checked}
         <button type="submit" name="~BT-Voucher~">Gutschein einlösen</button>
      {/!ST-Voucher_checked}
   {/@VOUCHER-MultiVoucher}
{/VOUCHER-MultiVoucher}
```

> [!NOTE]
>
> 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.

> [!NOTE]
>
> 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.

| Tag | Meaning |
| - | - |
| `VOUCHER-SpecialFeatures_Compatibility_labels` | count, bracketing and loop over its own labels |
| `VOUCHER-SpecialFeatures_Compatibility_whitelist` | the same for the inclusion list |
| `VOUCHER-SpecialFeatures_Compatibility_blacklist` | the same for the exclusion list |
| `VOUCHER-SpecialFeatures_Compatibility_exclusive` | Bracketing: the voucher is exclusive |
| `VOUCHER-SpecialFeatures_Compatibility_ok` | Bracketing: it is compatible with all others |
| `VOUCHER-SpecialFeatures_Compatibility_notCompatible` | loop over the vouchers it is not compatible with |
| `VOUCHER-SpecialFeatures_Compatibility_notCompatible_errorCode` | the reason as a number |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{!VOUCHER-SpecialFeatures_Compatibility_ok}
   <p>Dieser Gutschein lässt sich nicht zusammen einlösen mit:</p>
   <ul>
      {@VOUCHER-SpecialFeatures_Compatibility_notCompatible}
         <li>~VOUCHER-SpecialFeatures_Compatibility_notCompatible~</li>
      {/@VOUCHER-SpecialFeatures_Compatibility_notCompatible}
   </ul>
{/!VOUCHER-SpecialFeatures_Compatibility_ok}
```

> [!NOTE]
>
> 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.

> [!NOTE]
>
> 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.

> [!WARNING]
>
> 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.

| Tag | Meaning |
| - | - |
| `VOUCHER-MetaCode` | the collective code, also a bracketing |
| `VOUCHER-MetaSubCount` | the number of individual vouchers redeemed |
| `VOUCHER-IsFromMeta` | Bracketing: this voucher comes from a collective code |
| `VOUCHER-MetaShowAsBlock` | Bracketing: the collective code is displayed as a block |

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{VOUCHER-MetaCode}
   <p>Aktionscode ~VOUCHER-MetaCode~ mit ~VOUCHER-MetaSubCount~ Gutscheinen eingelöst.</p>
{/VOUCHER-MetaCode}

{@VOUCHER-MultiVoucher}
   {VOUCHER-IsFromMeta}<span class="hinweis">aus dem Aktionscode</span>{/VOUCHER-IsFromMeta}
{/@VOUCHER-MultiVoucher}
```

> [!WARNING]
>
> 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.

> [!WARNING]
>
> `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.

> [!NOTE]
>
> 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.

> [!NOTE]
>
> `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.

> [!NOTE]
>
> 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

| Group | Tags | Type |
| - | - | - |
| Loading | `VOUCHER-LoadData()` | range tag only |
| Loading | `VOUCHER-DataExists` | range and negative range |
| Identifiers | `VOUCHER-Number`, `VOUCHER-ChargeID`, `VOUCHER-ChargeLabel`, `VOUCHER-ChargeCreator`, `VOUCHER-CurrencyCode` | single tag and bracketing |
| Deduction type | `VOUCHER-AmountType_code` | single tag only |
| Deduction type | `VOUCHER-AmountType_isAbsolute`, `_isPercent`, `_isCappedSetChildPosition` | bracketing only |
| Values | `VOUCHER-Value_absoluteamount`, `_absoluteamount_left`, `VOUCHER-Value_percent`, `VOUCHER-Value_cappedsetchildpositionamount`, `VOUCHER-MaxDiscountValue`, `VOUCHER-VATIndex`, `VOUCHER-VATRate` | single tag and bracketing |
| Validity | `VOUCHER-ValidFrom_date`, `_unixtimestamp`, `VOUCHER-ValidUntil_date`, `_unixtimestamp`, `VOUCHER-ValidInSubhops_list`, `VOUCHER-MinOrder_Value` | single tag and bracketing |
| Redemption limits | `VOUCHER-MaxRedeemable`, `_Redeemed`, `_Remaining` | single tag and bracketing |
| Minimum order value | `VOUCHER-MinOrder_Base`, `VOUCHER-MinOrder_Remaining` | single tag and bracketing |
| Minimum order value | `VOUCHER-MinOrder_NotReached` | bracketing only |
| Type | `VOUCHER-Type_code`, `VOUCHER-CampaignType_code` | single tag only |
| Type | the eight `VOUCHER-Type_is…`, `VOUCHER-CampaignType_isCampaign`, `_isRegular` | bracketing only |
| Type | `VOUCHER-BoundUserIndex` | single tag and bracketing |
| Product filter | `VOUCHER-CatProdFilter_data` | single tag, bracketing and loop |
| Product filter | `VOUCHER-CatProdFilter_data_index`, `_data_index_code`, `VOUCHER-CatProdFilter_SetBehavior` | single tag only |
| Product filter | all other `VOUCHER-CatProdFilter_…` | bracketing only |
| Customer filter | `VOUCHER-CustomerFilter_data` | single tag, bracketing and loop |
| Customer filter | `VOUCHER-CustomerFilter_data_index`, `_data_index_code` | single tag only |
| Customer filter | `VOUCHER-CustomerFilter_active`, `_data_index_isUserIndex`, `_data_index_isCustomerNumber` | bracketing only |
| Added products | `VOUCHER-VoucherProducts_data` | single tag, bracketing and loop |
| Added products | `VOUCHER-VoucherProducts_data_prodnumber` | single tag only |
| Added products | `VOUCHER-VoucherProducts_active` | bracketing only |
| Multiple currencies | the five `VOUCHER-MultiCurrency_…` | single tag and bracketing |
| Special functions | `VOUCHER-SpecialFeatures_…_SetBehavior` | single tag only |
| Special functions | `VOUCHER-SpecialFeatures_…_ValueList`, `_Filter_FieldName`, `_Filter_ValueInList` | single tag and bracketing |
| Special functions | `VOUCHER-SpecialFeatures_…_Filter` | single tag, bracketing and loop |
| Special functions | all other `VOUCHER-SpecialFeatures_…` | bracketing only |
| Multiple vouchers | `VOUCHER-MultiVoucher` | all four usage types |
| Compatibility | `_Compatibility_labels`, `_whitelist`, `_blacklist`, `_notCompatible` | single tag, bracketing and loop |
| Compatibility | `_Compatibility_notCompatible_errorCode` | single tag only |
| Compatibility | `_Compatibility_exclusive`, `_Compatibility_ok` | bracketing only |
| Meta voucher | `VOUCHER-MetaCode`, `VOUCHER-MetaSubCount` | single tag and bracketing |
| Meta voucher | `VOUCHER-IsFromMeta`, `VOUCHER-MetaShowAsBlock` | bracketing only |

> [!NOTE]
>
> 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.

## Related topics

* 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)


## Related topics

- [Vouchers](https://dokumentation.websale.de/en/admin-interface/marketing/gutscheine.md)
- [Voucher](https://dokumentation.websale.de/en/frontend/referenz/aktionen/voucher.md)
- [$wsVoucher - Vouchers](https://dokumentation.websale.de/en/frontend/referenz/module/wsvoucher.md)
- [Redeeming multiple vouchers](https://dokumentation.websale.de/en/v8s/gutscheine-anbieten/mehrere-gutscheine-einloesen.md)
- [META vouchers](https://dokumentation.websale.de/en/v8s/gutscheine-anbieten/meta-gutscheine.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.