DELIV-.
All these tags are called DELIV-Data with a suffix and work within a loop: the shop runs once through all configured shipping methods, and in each iteration the tags refer to exactly one of them.
The shipping methods are maintained in the shop configuration shop.config, each in its own <+Deliverer> section. What you enter there, these tags output in the template.
Guide: Creating shipping methods, section Individual positioning of shipping methods
The basic structure
The tags can be used on all templates; their natural place is the payment and shipping method page
ws_pay_deliv.htm. An exception applies to MultiDelivery and split order: there they are only permitted within the {@BASKET-PR-Data} loop.The complete example
Shipping method details
In most cases,
DELIV-Data_NameSuffix saves you the individual parts. It already outputs the name with the two suffixes configured for the country and for free shipping.DELIV-Data_type is a free field. You can use it to group shipping methods in the template, for example to display all express variants together without naming their IDs in the template.A custom onClick on the icon
DELIV-Data_Image_html_js_onclick outputs what is stored as the click action for the icon in the <+Deliverer> section.
The configured action may contain the two placeholders
~ID~ and ~Link~. On output, the shop replaces them with the identifier of the shipping method and the stored address. This way, one entry in the configuration is enough for all shipping methods.The costs
All cost values are output with the price formatting set in the shop configuration. They do not contain a currency symbol; you add it yourself, for example with
WS-CurrencySymbol.Customer-specific discounts
If a discount on shipping costs is stored for the signed-in buyer, four tags output it.The discount rate is output as a plain number with two decimal places, without price formatting and without a percent sign. The amounts, on the other hand, follow the shop’s price formatting.
Availability and selection
A shipping method can be blocked for this order, for example because the delivery country does not match or the weight is exceeded. It does not disappear from the list but is marked as unavailable.DELIV-Data_disabledmessage is the text for the buyer; DELIV-Data_disabledcode is the technical identifier of the same reason. You need the code if you want to display something different depending on the reason, for example a link to partial delivery when the weight is exceeded.DELIV-Data_IsDefault applies if the signed-in buyer has stored a default shipping method in their customer account and it is this one. This tag is not described in the previous documentation but exists in the shop.The selection button
Eight tags provide everything the radio button needs. You do not have to invent a name or identifier yourself.XX is the identifier of the shipping method, this becomes:
The configured click action may contain the placeholders
~ID~ and ~RadioButtonID~. The shop replaces them with the identifier of the shipping method and the ID of the radio button.CSS classes and IDs
Five tags generate IDs and classes for the individual building blocks of a shipping method. All of them expect the name of the building block in the brackets.
Valid building block names are
main, logo, radio, text, name, suffix, clear, disabled, additionalinput, additionalinput_checkbox, additionalinput_name, additionalinput_input, additionalinput_list, additionalinput_infotext and additionalinput_error.
DELIV-Data_html_class_counter() numbers the shipping methods consecutively. This lets you color every second row differently without calculating in the template.DELIV-Data_html_class_additionalinput_global(). It only accepts the building block names that start with additionalinput.
Additional input fields
Some shipping methods need information from the buyer: a preferred date, a drop-off location, consent to delivery without a signature. Such fields are defined in the shop configuration in the<DelivererAdditionalInput-Definitions> section and assigned to the shipping methods.
DELIV-Data_AdditionalInput is the loop over them.
Distinguishing the three field types
An additional field is either a selection list, a text input field or a checkbox. There is an area tag for each type.DELIV-Data_AdditionalInput_Type_code outputs the same information as a number. For case distinctions in the template, the three area tags are the better choice because they remain readable.The complete example
For a checkbox,
DELIV-Data_AdditionalInput_value outputs the word checked if the buyer had ticked it. It therefore belongs in the element without an attribute name. For a text input field, it is the entered text and belongs in value. For a selection list, it is the technical identifier of the selected entry; DELIV-Data_AdditionalInput_value_txt provides the readable text.The entries of a selection list
DELIV-Data_AdditionalInput_listbox is the loop over the entries from the <+listentry> sections.
For a field that is not a selection list, the loop simply does not run. An additional query on
Type_isListbox is therefore not strictly necessary, but it makes the template more readable.Free additional information
For information not covered by any of the fixed fields, there isDELIV-Data_AdditionalInfo-<id>. You enter the values in the respective <+Deliverer> section with the parameter +AdditionalInfo-<id>.
The case of the identifier does not matter. Nevertheless, stick to one spelling so that the configuration and template remain readable together.
DELIV-Data_DestDepInfo. It outputs destination-dependent additional information about the shipping method, which the shop determines itself.
Shipping method per basket item
If the shop offers shipping method selection per basket item or per delivery address, the loop is placed inside{@BASKET-PR-Data}. The shop then appends an additional identifier to the field names and IDs so that the selection groups do not interfere with each other.
As long as you use the names and IDs from the
DELIV-Data_Selection tags, you do not need this tag: the identifier is already included there. You need it if you want to access a specific selection group in JavaScript. This tag is not described in the previous documentation but exists in the shop.The tags at a glance
All tags are permitted on all templates, in each case within the
DELIV-Data loop. With MultiDelivery and split order, they are additionally only permitted within {@BASKET-PR-Data}.
Related topics
- Guide: Creating shipping methods
- Reference: List of rejection reasons
- Reference:
<DelivererAdditionalInput-Definitions>section - Reference: PAY- (individual positioning of payment methods)
- Reference: BASKET- (multiple delivery addresses)
