The two values
Both tags already output the amount in the shop’s number format, that is, with the configured decimal and thousands separators and two decimal places. The currency symbol is not included; use
WS-Currency for that.As a bracketing, both apply if their value is not zero. A limit of zero means that no small quantity surcharge is provided at all, and an amount of zero means that a limit exists but nothing is charged. Both cases can thus be caught cleanly.
Where the values come from
Limit and amount are determined separately from each other. For each of the two: if the buyer is logged in and there is a value in their customer account, that value counts. Otherwise, the value from the shop configuration counts.The four tags are pure bracketings and are mutually exclusive in pairs. Instead of the negative bracketing of
_IsConfigDependent, it is therefore better to use _IsUserDependent, which reads more clearly in the template.The technical codes
For each pair, there is a tag that outputs the same distinction as a number.Both are exclusively single tags. For a case distinction in the template, use the four bracketings; the codes are better suited for passing to your own scripts.
When the surcharge actually applies
For wording the texts in the template, it is helpful to know how the shop system calculates. Three conditions must be met at the same time.What the limit refers to is defined in the
SurchargeCalculation-Mode parameter of the shop configuration. With subtotal, the default, it is the basket subtotal including all discounts. With totalsumofproducts, it is the sum of the individual items, skipping products that are excluded from the small quantity surcharge.The product-side exclusion only takes effect in
totalsumofproducts mode. If a basket consists exclusively of excluded products, the basis counts as empty and no surcharge is calculated. In subtotal mode, this exclusion is not evaluated.The surcharge is rounded commercially and included in the total with its own VAT rate. Which rate that is is defined in the shop configuration under the global costs.
Tags at a glance
All eight tags are permitted on all templates and are not bound to any page state. They are therefore also available on the product page or in the customer account, not just in the basket.
Related topics
- Guide: Small quantity surcharge
- Guide: Customer account
- Reference: BASKET- (basket totals)
- Reference: The parameters
Surcharge-Value,SurchargeLimit-ValueandSurchargeCalculation-Modein the shop configuration
