BASKET-PR-AdditionalUserInput_1…20), everything here is defined in the shop configuration shop.config in the <BasketProductOptions> section: which fields exist, where they appear, what they cost and how the input is validated. The tags with the prefix BPO- output this configuration in the template.
Guide: Free fields at split item level · Reference: Section <BasketProductOptions>
The structure in the template
All tags in this group are nested inside each other, and the order of nesting is fixed.BPO-LevelOfUsage_XXX ensures that the block only outputs something on the matching template.
Only one level of usage is ever active per shop. So you cannot offer a field per order and a field per basket item at the same time.
The complete example
The level of usage
Which of the three levels applies is defined by theLevelOfUsage parameter in the <BasketProductOptions> section. Each level has its own range tag and its own place in the template.
BPO-UseOnce
Encloses the entire block for theOnce level. It sits one level above BPO-Data and is the only tag in this group that stands outside the loop.
At first glance, the two tags seem redundant. However,
BPO-UseOnce belongs to the basket page and keeps the block out of the item loop, while BPO-LevelOfUsage_Once checks the setting of the individual field block. For the other two levels, BPO-UseOnce is omitted.BPO-LevelOfUsage_BasketPositionAddress
Applies when the fields apply per delivery address within a basket item. This requires the split order function, that is, splitting an item across multiple delivery addresses. Guide: Splitting a basket item and sending it to multiple delivery addresses · Reference: BASKET-PR-D-MultiData, BASKET-PR-D-SingleDataThe loop over the field blocks
BPO-Data
Loop over the field blocks configured in<BasketProductOptions>. In each iteration, the fields and cost calculations of one block are available.
All other tags in this group except
BPO-UseOnce and BPO-AllCosts_Sum are only permitted inside this loop. Outside it, they return nothing because they lack the reference to the field block.BPO-ID
Outputs the identifier of the field block, that is, the value ofBasketProductOptionID from the shop configuration.
The identifier has no meaning for the buyer. It is useful as a hook for CSS and JavaScript when several field blocks should look different.
The input fields
BPO-Input
Loop over the fields of the block. As a single tag, it outputs the number of configured fields.BPO-Input_Type_Input and BPO-Input_Type_Checkbox
The two range tags distinguish the field type.BPO-Input_Type_Input applies to the text input field, BPO-Input_Type_Checkbox to the checkbox.
BPO-Input_ID and BPO-Input_input
BPO-Input_ID outputs the identifier of the field from the shop configuration, BPO-Input_input the technical field name for the name attribute.
BPO-Input_value
Returns what the buyer entered. For the text input field, this is the text; for the checkbox, the valueon. As a range tag, it applies as soon as the field is filled in or checked.
On the order overview page, output without an input field makes sense so that the buyer sees their entries once more before submitting. For this,
BPO-Data, BPO-Input and BPO-Input_value without the LevelOfUsage enclosure are sufficient.BPO-Input_error
Outputs the error message stored in the shop configuration for the input validation of this field. As a range tag, it only applies if the validation actually failed.The message comes from the
<GenericInputChecks> section, linked via the field’s +UseGenericInputCheck parameter. It belongs directly next to the field and not at the top of the page, otherwise the buyer will look at the wrong one when there are several fields.<GenericInputChecks>
BPO-Input_costs
Outputs the additional costs attached to this one field.This is the output at the field, not the billing. The amount actually charged is provided by
BPO-Costs_Sum, and the total across all field blocks by BPO-AllCosts_Sum.The additional costs
Costs are not attached to the field but to the field block. A block can have several cost calculations, and each calculation has its own conditions. That is why there is a second loop alongside the field loop.BPO-Costs
Loop over the cost calculations of the block. As a single tag, it outputs their number.BPO-Costs_Valid and BPO-Costs_Sum
BPO-Costs_Valid applies when the configured conditions of this cost calculation are met. BPO-Costs_Sum outputs the calculated amount and applies as a range tag when an amount is incurred.
Only display the costs inside
{BPO-Costs_Valid}. The loop runs over all configured calculations, including those whose conditions do not currently apply.BPO-Costs_ID, BPO-Costs_Name and BPO-Costs_Value
The type of calculation
Three range tags indicate which rule is used for the calculation. Exactly one of them always applies.The three tags are mainly useful during setup to see which rule applies. For the buyer, the final amount from
BPO-Costs_Sum is usually sufficient.BPO-AllCosts_Sum
Outputs the sum of all additional costs across all field blocks. As a range tag, it applies if any costs are incurred at all.This tag stands outside the
BPO-Data loop and belongs in the invoice footer next to shipping and payment. It is the only value in this group that visibly explains the order total.The tags at a glance
The tags are permitted on the product detail view (
ws_product.htm), the basket page (ws_basket.htm) and the order overview page (ws_place_order.htm), with these exceptions:
In addition, all tags except
BPO-UseOnce and BPO-AllCosts_Sum are only available inside the BPO-Data loop.
Related topics
- Guide: Free fields at split item level
- Reference: Section
<BasketProductOptions> - Reference: Section
<GenericInputChecks> - Reference: BT-BPO_Refresh
- Reference: Items in the basket
