Guide: Requesting billing and multiple delivery addresses
The structure in the template
The outer check with
BASKET-PR-MultiDeliveryAddress_available is worthwhile because most products in a shop cannot be split at all. Without it, every ordinary item has a range that never displays anything.What is possible
These tags answer what is intended for the product, regardless of what the buyer has set.The abbreviation
mda stands for the regular split addresses, sc for SampleCopy, that is, the sample copy. The two are configured separately and checked separately.State the minimum quantity and denomination before the buyer enters anything. An error message after submitting is a surprise for them; a step of 25 pieces mentioned beforehand is not.
What has been set
BASKET-PR-D
The range is displayed if the option “Deliver to multiple addresses” has been selected and at least one different delivery address exists.BASKET-PR-D-SingleData and BASKET-PR-D-MultiData
BASKET-PR-D-SingleData applies if exactly one different delivery address has been selected. BASKET-PR-D-MultiData applies from two addresses and is also the loop over them. As a single tag, it outputs the number of addresses used, including the sample copy.
The two are mutually exclusive. An item has either one different address or several, and the template sections for them look different: one is a single line, the other a table.
BASKET-PR-D-MultiDataAvailable and BASKET-PR-D-MultiDataQuantityleft
BASKET-PR-D-MultiDataAvailable applies if another address may still be created. Minimum quantity and remaining quantity are already taken into account. BASKET-PR-D-MultiDataQuantityleft outputs the quantity not yet distributed.
The remaining quantity is the most important feedback on this page. Without it, the buyer only notices when submitting that there are pieces left over and has to recalculate the distribution from scratch.
BASKET-PR-MDMaffected and BASKET-PR-D-MDMaffected
Both indicate that a delivery address has been changed.BASKET-PR-MDMaffected refers to the item, BASKET-PR-D-MDMaffected to the individual split address within the item.
The individual split address
These tags belong in the loop{@BASKET-PR-D-MultiData} and each describes one address.
BASKET-PR-D-MultiData_quantity_input as a range tag answers whether the quantity can be changed at all. For the sample copy, this is often not the case, so a fixed number belongs there instead of an input field.The two shipping cost tags do two things: as a range tag, they indicate what the share depends on; as a single tag, they output the amount. For a split item that goes to two countries, this makes it clear why the shares differ.
Sample copies
The buttons
All actions run via the same button with a changing value. The name comes fromBASKET-PR-D-ButtonName; the value determines what happens.
The three values for changing are also range tags. They only apply if the change is allowed in the current state. Bracket the button with them instead of outputting it unchecked.
The validation
BASKET-DeliverySplit_OK triggers the validation of all basket items and applies if there is nothing to object to. BASKET-PR-MultiDeliveryAddress_ErrorCode() checks a single item and outputs the error code.
The error codes
Without a parameter, the tag outputs the code and applies as a range as soon as any error exists. With a parameter, it only applies for exactly that code. For understandable messages, the variant with a parameter is the right one, because only it can say what needs to be done.
Additional costs due to split order
Partial delivery
BASKET-PR-SplitDelivery
The range is displayed if only part of the item can be delivered and the availability is therefore output split up. The tag is only permitted withinBASKET-PR-Inventory.
Related topics
- Guide: Requesting billing and multiple delivery addresses
- Guide: Offering distribution products
- Reference: Basket totals
- Reference: Items in the basket
