Skip to main content
The tags with the prefix D- represent the alternative delivery address. They are the mirror image of the A- tags for the billing address and follow the same blueprint: a technical field name to which a suffix is appended. Beyond that, a delivery address can do something that a billing address cannot. A customer may save several of them, set one of them as the default and even use several at the same time in one order. The additional groups on this page exist for this purpose. Guide: Requesting an alternative delivery address · Reference: A- (Billing address)

Where the field names come from

The basic fields of the delivery address are defined in the shop.config shop configuration in the <DeliveryAddressFields-Txt> section. The parameter name is the technical field name, the value after it is the label.
From FirstName, this results in D-FirstName, D-FirstName_input, D-FirstName_text and all other suffixes. Reference: <DeliveryAddressFields-Txt> section

A complete input field

The example in the source writes ~D-FirstName_error without a closing tilde in the class attribute of the input field. Typed like that, the tag name remains as text in the markup. Make sure that every tag is enclosed by two tildes.

The suffixes on the input field

_visible and _required depend on the shop configuration. Wrap every field in _visible; it then disappears automatically if it is not needed for the selected country or the selected address type.
_error as a single tag results in the string _error. In the example, this becomes the class input_error as long as there is an error, and input otherwise. This way, you do not need a second wrapper just for styling.

Input-dependent control

_action applies if a dependency is stored for this field in the <AddressFields-Actions> section. The template must then have the address input reloaded.
The wrapper prevents an action from being attached to every field. Only the fields for which a dependency actually exists trigger the reload.

Explicitly reporting a field as deleted

If the buyer clears a field, this is often only transmitted to a connected system as “not changed”, and the old value remains there. With _hiddeninputflagdeleted, you report the deletion explicitly.
If an empty field is to be transmitted but not marked as deleted, leave value empty.

Selection lists

For fields with a fixed set of values, for example the country, the template builds the selection list itself from four suffixes.
The suffix _list generates a ready-made selection list, but will no longer be supported in the next version of WEBSALE V8s. Build new templates with the four suffixes above; then you can also style the list.
Guide: Selection lists for address data

Special fields

D-CountryISO, D-SalutationCode and D-TitleCode are intended for passing on to connected systems. To the buyer, you show D-Country, D-Salutation and D-Title, i.e. the plain text versions.
The shop generates the three selection lists from D-DateOfBirth_list itself. They can be styled via the class select_date_of_birth, which is assigned to all three, and via the IDs ws_input_delivery_date_of_birth_day, ws_input_delivery_date_of_birth_month and ws_input_delivery_date_of_birth.
The ID of the year list has no suffix and is simply called ws_input_delivery_date_of_birth. If you address it with _year following the pattern of the other two, you will not hit anything.

The saved delivery addresses

D-LoadData

Loads all saved delivery addresses of the logged-in customer. Only after that do the other D- tags return anything outside the checkout process.
The tag only takes effect for a logged-in customer and only via an encrypted connection. On a page without HTTPS or for a guest, it has no effect, and the subsequent tags return nothing.
Every call retrieves the addresses from the database. Therefore, do not place the tag globally in the page header, but only where you really need the data.

D-Data

The central tag of address management, in three roles.

The default delivery address

D-IsDefault and D-SetAsDefaultLink belong inside the loop because they refer to the individual address. D-RemoveDefaultLink belongs outside, because there is only one default address and therefore only one link for removing it.
If the default is removed, the shop preselects the most recently used delivery address or the billing address, depending on the setting.
Guide: Setting a default delivery address

D-OneTime

Applies if the selected delivery address is used once and is not saved in the customer account.

Searching the delivery addresses

Anyone who has saved twenty or more delivery addresses needs a search.
Both tags and the button must be placed within the FORM-DelivAddrSearch form. In another form on the same page, the search has no effect.
The reset link only appears if a search has actually been performed. Without it, the buyer can only return to the full list by calling up the page again.
Guide: Offering full-text search for multiple customer data

Selecting a saved address

In the checkout process, the buyer selects from their saved delivery addresses. D-DeliverySelection with four suffixes is available for this.
The four suffixes _input, _error, _selected and _value work exclusively within the positive range {D-DeliverySelection}. Outside of it, they are invalid. This is the same pattern as for selecting the bank account and the credit card.
The outer range applies if any saved delivery addresses exist at all. The selection list thus disappears automatically if there is nothing to select.

Multiple delivery addresses per order

With MultiDelivery, each shopping basket position goes to its own delivery address. The management template for this needs a second set of suffixes, recognizable by the mdm in the name.
The two sets must not be mixed. The tags without onetime apply to saved addresses, those with onetime to addresses used once. For a saved address, mdm_onetime_editmode_buttonvalue returns nothing, and vice versa.
Unlike the four suffixes in the previous section, the mdm tags do not need to be wrapped in {D-DeliverySelection}. They work independently of it, but belong inside the {@D-Data} loop.

How often an address is used

Guide: Selecting multiple delivery addresses · Reference: Tags for multiple addresses

Tag overview

The suffixes on the field

The other tags

  • Guide: Requesting an alternative delivery address
  • Guide: Selection lists for address data
  • Guide: Setting a default delivery address
  • Guide: Selecting multiple delivery addresses
  • Reference: A- (Billing address)
  • Reference: Tags for multiple addresses