How the check works
The shop determines the current traffic light status for each basket item and compares it with your list. One matching item is enough for the voucher to be accepted. If none matches, the shop rejects it.Products for which no traffic light status can be determined never meet the condition. A basket consisting entirely of such products always leads to rejection.
This filter does not recognize the finer gradations
red-hard and red-soft that exist for display in the template. Only red counts here.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: Create the filter in the voucher
When creating the voucher in the voucher generator, enter a string following the scheme below in the Kundenspezifische Features (custom features) field at the very bottom.Behavior for set products
Only the value
single is evaluated. Any other value and an empty entry mean asUnit. A typo in single therefore silently results in unit behavior.Step 2: Add the error message
If no basket item matches the filter, the shop rejects the voucher with reason 22. Add this reason wherever you have integrated the voucher entry, i.e. on the basket pagews_basket.htm or the order overview page ws_place_order.htm.
Step 3: Output the configuration in the template (optional)
For verification, you can display which stock levels an entered voucher is tied to.As a standalone tag,
VOUCHER-SpecialFeatures_InventoryState_SetBehavior outputs a number, 0 for asUnit and 1 for single. In the example, the query with a parameter translates the number into plain text so that the page does not show “Behavior for set products: 0”.VOUCHER-SpecialFeatures_InventoryState_ValueList outputs the list with a leading and trailing comma, i.e. ,green,yellow,. This is how it is stored internally so that the shop can check for whole values. For display purposes, remove the outer commas.Related topics
- Guide: Offering vouchers: Overview
- Guide: Creating or importing vouchers
- Guide: Providing voucher entry
- Guide: Vouchers depending on product data
