BD- output these tiers on the product detail view.
The tiers are maintained in the technical product data field BulkDiscount. In the template, you iterate over them with BD-Data and output quantity, price and savings for each iteration.
Guide: Product prices, section Tiered prices · Reference: PR-BulkDiscount
The tier table
The first tier is usually quantity 1 with the regular price and savings of zero. That is why
BD-Discount and BD-DiscountRate are bracketed: both only apply for a value greater than zero, so in the first row the column stays empty instead of showing “0,00”.The tags
They are permitted on the product detail view (
ws_product.htm). BD-IPart(Price) and BD-FPart(Price) are permitted on all templates on which product data appears.
BD-Data
Loop over all tiers of a product. With n tiers, the area is run through n times.BD-Quantity
Outputs the quantity from which this tier applies.The output takes into account the decimal places configured for this product’s quantity. For a product sold by the metre, it therefore shows 2,5 and not 2.
BD-Price
Outputs the unit price of this tier.The price already includes the customer-specific product discount, if one is stored for the logged-in buyer. It is therefore not necessarily the same price that a visitor who is not logged in sees.
BD-Discount and BD-DiscountRate
BD-Discount outputs the savings compared to the regular price as an amount, BD-DiscountRate the same savings as a percentage. As area tags, both only apply if the savings are greater than zero.
The amount is in the shop’s currency and not necessarily in euros. Therefore, place
~WS-CurrencySymbol~ after it instead of a fixed symbol.BD-BasePriceInfo
Outputs the base price information of this tier, i.e. the price per unit. It only applies if base price information is maintained for this entry in the product data fieldBulkDiscount.
Splitting and formatting prices
BD-IPart(Price) and BD-FPart(Price)
Output the integer part and the fractional part of the tier price respectively. Only the parameterPrice is permitted.
This is intended for typographic presentation in which the cents appear smaller or superscript. For everything else,
BD-Price is the simpler choice.BD-Price_prec and BD-Discount_prec
Output the tier price and savings with the number of decimal places configured in the shop configuration for the_prec tags.
These two tags are intended for further processing, for example for calculations in the template or for passing to a third-party system. For display to the buyer,
BD-Price and BD-Discount remain the right choice.Alternative currency
Both accept a three-letter ISO currency code as a parameter. Without a parameter, they convert into the currently selected alternative currency.
As with all alternative currency tags, the area applies as soon as a conversion factor exists, not only for an amount greater than zero.
Related topics
- Guide: Product prices
- Guide: Defining discounts
- Reference: PR-BulkDiscount
- Reference: AltCurrency- (alternative currency)
