How the subsidy is offset
The shop never deducts more than the order costs. An order total below zero cannot occur as a result.
Prerequisite
The subsidy comes from the customer import module. Talk to your WEBSALE representative if you are not using it yet.Step 1: Activate the function in the shop configuration
Add theCustomerSubvention section to the shop.config.
Name-Txt and Remainder-Txt are not template texts. The shop writes them as labels into the order data, next to the respective amount. Your merchandise management system and your order confirmation access them. You write the texts in the template yourself in step 2.Step 2: Display the account balance in the template
Two tags provide information about the balance.As a single tag, both tags return the same amount. The difference lies solely in their behavior as a bracket. If you want to output the amount unconditionally anyway,
WS-SubventionRemainder is unproblematic.Both tags trigger the total calculation if required. You can therefore also use them on pages where the basket has not yet been calculated.
Step 3: Store subsidies per customer
The balance is stored in the customer account in theSubvention field and is set via the customer import. You can find the name of the import parameter in the customer import documentation.
A subsidy applies exactly to the customer in whose account it is stored. Guest customers have no account and therefore cannot receive a subsidy.
What arrives in the order data
If the function is active, the shop writes these fields for each order.The four fields with
_DName and _DValue only appear if the respective amount is not zero. A customer without a remaining balance therefore does not generate a CustomerSubventionRemainder_DName. If your merchandise management system evaluates these fields, it must be able to handle their absence.The three numeric fields without a name suffix, on the other hand, are always written, even with the value 0.00.
Related topics
- Guide: Bonus points
- Guide: Offering vouchers: Overview
