Skip to main content
The checkout section covers everything that controls the order process in the storefront: from the simple guest or fast order via custom input fields to the rounding of subtotals. It also enables quick item entry by item number, checks basket contents against rules on demand (e.g. mandatory accessories), manages shipping methods including price logic and integrates parcel tracking.

checkout* - Basic structure

The basic structure of the checkout node is shown below:

Parameter overview

checkout.checkout - Order flow

This section bundles the central settings of the order process. It is aimed at shop operators who define the flow commercially and at frontend developers who output the result in the template. It is assumed that you are familiar with the general order flow. Defined here is how the order process runs, which additional fields appear and how shipping and payment methods are pre-selected. Also located here are the rules for voucher calculations, a small-quantity surcharge, the handling of addresses from the PayPal Express Checkout, and the point at which field errors become visible. Not covered in this section: shipping methods and their price logic are under checkout.shippingMethod, the rounding of voucher amounts under checkout.voucher, payment methods under payment.payment. The settings take effect at four different points in the flow. This categorisation helps to find the right parameter:
  • Before the order - access and pre-selection: Who is allowed to order (allowGuestAccounts, allowFastOrder), what is pre-selected (defaults), which additional fields appear (freeFields).
  • During the order - calculation: Subtotal rounding (subtotalRounding), voucher calculation (voucherAppliesPerItem, minOrderValueCalculation, minOrderValueIgnoreVoucherReduction, disableOrderOnIneffectiveVoucher) and the small-quantity surcharge (surcharge).
  • During the order - display of errors: fieldErrorVisibility.
  • After the order: Which templates may still access the order data (templatesAfterCheckout).
Below is an example configuration for checkout.checkout:

Parameter overview

Whether a guest order with an already registered email address is allowed is not defined here, but in the configuration of the CheckoutSetGuestEmail action under restrictions.allowGuestOrderWithRegisteredEmail.
Priority logic for defaults: If several sources (e.g. user selection or customer preferences) provide a value for a field in defaults, the following order of priority applies:
  1. Active user selection in the current session - is never automatically overwritten.
  2. Stored customer preferences of a logged-in customer (if supported).
  3. Merchant configuration - the defaults values defined here.
  4. System fallback - e.g. automatic selection when only one option is available, or the first valid option after sorting (see autoSelectSingleOption).
Re-selection when a chosen method subsequently becomes invalid:The priority logic above applies to the initial selection. If, on the other hand, an already made but now invalid selection is handled - e.g. because the customer changes the delivery country and the chosen shipping method is not offered there - prevSelectionInvalidAutoSelect controls how the shop reacts (see table above). autoSelectSingleOption remains active as a fallback in all modes.
Note on rounding behaviour for line-item-based voucher calculation:
If “voucherAppliesPerItem” is set to “true” and a percentage voucher with a configured maximum amount is used, the granted discount may exceed this maximum amount by up to €0.01. The reason is that the discount is rounded individually per line item and the sum of these roundings may deviate minimally from the expected total.

Small-quantity surcharge

The small-quantity surcharge is a fixed amount that is added to small baskets. In this way, the shop covers the processing and shipping costs that are proportionally too high for a small order. The shop recalculates the surcharge on every basket calculation, in the following order:
  1. The shop forms the sum of the surchargeable line items. What is counted is the line total, i.e. price times quantity. Sub-items of a set are not counted, because otherwise they would go into the sum twice.
  2. If the basket contains no surchargeable line items, no surcharge is applied.
  3. If the sum exceeds the value threshold, no surcharge is applied.
  4. Otherwise cost is calculated as the surcharge.
The comparison in step 3 is a “greater than”. With "threshold": 30 and a sum of exactly €30.00, the surcharge still applies; from €30.01 upwards it no longer does. Set the threshold accordingly to the last amount for which the surcharge should still apply. By default, every line item is surchargeable. You can exempt individual products via the product field that is stored under content.usedFields.validForSurcharge: if this field returns false for a line item, it is neither counted for the check nor does it trigger the surcharge. This is useful, for example, for voucher products or digital items that do not incur processing effort. An example: A surcharge of €1.99 should apply up to a merchandise value of €30. The configuration in checkout.checkout is then:
Output in the cost breakdown of the template. The surcharge is available as a calculated amount in $wsCheckout.sum.surchargeCost; if it is 0, the line is not output:
Expected effect: For a basket of €24.50, the line appears with €1.99, and the total rises to €26.49. For a basket of €45.00, the line is omitted.

Blocking ineffective vouchers

A customer can redeem a voucher that produces no discount at all in the current basket. If they order in this state, this leads to a query or complaint because the expected discount is missing. disableOrderOnIneffectiveVoucher prevents this. The flow:
  1. The customer redeems a voucher. The voucher is stored in the session.
  2. On every calculation, the shop checks for each redeemed voucher whether it produces a discount greater than 0 in the current basket.
  3. A voucher is considered ineffective in two cases: the basket does not reach its minimum order value, or the calculated discount is 0 because no line item in the basket is eligible for a discount from this voucher.
  4. Pure shipping-cost vouchers without a percentage or absolute value are exempt. They act via the shipping costs and never block the order.
  5. If disableOrderOnIneffectiveVoucher is active and at least one voucher is ineffective, the shop reports the order as blocked.
In the template, you read the state via the flag $wsCheckout.isOrderBlockedByIneffectiveVoucher and disable the order button:
Expected effect: After redeeming a voucher with a €50 minimum order value into a basket of €20, the order button is disabled and the notice appears. After topping up the basket beyond €50, the button is active again. You maintain the associated error texts not here, but in the configuration node checkout.voucherErrors under ineffectiveVoucherErrorCodes. There the two cases are stored separately as noValidProducts and minOrderValueNotReached, so that you can give the customer the concrete reason instead of a general notice. Only set the parameter to false if customers in your shop are deliberately allowed to leave vouchers in the basket without them taking effect.

Addresses from the PayPal Express Checkout

If a customer starts the PayPal Express Checkout from the basket, PayPal returns the address stored there. This address does not always meet the validation rules of your shop - for example because PayPal does not pass on the house number separately. expressCheckoutSkipsAddressValidation defines how the shop handles this. true (default): The shop does not validate the address and does not take it over as the billing or delivery address of the order. It remains in the session and is available in the order data under paypalCheckout.rawAddress. Third-party systems can read it there and, if needed, process it themselves. The default true thus keeps the shop’s address data free from unvalidated third-party data - the delivery address in the shop remains clean. false: The address is taken directly from PayPal as a regular address. It then has to meet the shop’s validation rules. Since it comes unvalidated from the PayPal account, it may not comply with these rules. In this case the customer must edit the address before completing the order - the Express Checkout thereby loses its advantage of being completable without an additional entry step. Regardless of this setting, the address data is displayed to the customer as far as PayPal supplies it. If PayPal does not deliver a street, for example, no street is shown either. Excerpt from the order data with the parameter active:
With the parameter active, the regular address fields of the order do not contain an address from the Express Checkout. It is therefore possible for an order to be created without regular address data. Whether such an order can be further processed depends on the connected connector. Check this before putting the Express Checkout into production.
true is the standard path for the PayPal Express Checkout: the shop does not validate the address and does not take it over. Only disable the parameter after review, as effects on the Express Checkout itself cannot be ruled out. PayPal’s requirements for this flow are not documented here - clarify them directly with PayPal if needed.

Templates after order completion

After the order is completed, the session is considered ended. The order data is then only available to the templates that count as part of the order confirmation. If the customer calls up another template, they receive a new session. In this new session, the order data can no longer be reached. This is intentional: a completed order session should not live on longer than necessary. The target page after checkout is included automatically. Every additional template that needs order data must be entered in templatesAfterCheckout - typically a PDF order confirmation:
Expected effect: Without this entry, the PDF order confirmation is empty because $wsCheckout.orderId and the remaining order data are missing in the new session. With the entry, order number, line items and totals are output. Missing order data on a follow-up page after checkout is therefore almost always a missing entry in this list.

Error display in checkout

Not every error should be shown to the customer immediately. Marking an empty required field red before the customer has even reached it feels like a customer’s mistake. An incorrectly formatted postal code, on the other hand, should be correctable immediately. fieldErrorVisibility separates these cases by error type.
After the click on “Buy”, all errors are displayed by default, regardless of this setting.In checkout there are basically two types of errors:
  • Errors that the system itself detects (e.g. “required field empty”, “invalid postal code”):
    These are provided via $wsCheckout.problems.* and can be fully controlled via the show*BeforeSubmit parameters.
  • Errors returned by the server (e.g. after the click on “Buy”):
    Here the settings of the show*BeforeSubmit parameters only apply partially. For customer data and draft addresses, $wsCheckout.problems.* is not available, so server errors there are instead filtered via the show*BeforeSubmit parameters. In all other areas of the checkout (e.g. payment method), server errors are always displayed immediately, regardless of the configuration.

checkout.voucher - Voucher settings

This section bundles the settings for the use of vouchers in the order process. Here, among other things, the number of vouchers a customer can redeem at the same time and how discount amounts for percentage vouchers are computationally rounded is defined. Below is an example configuration for checkout.voucher:

Parameter overview

checkout.directOrder - Online order form

Enables quick capture of items by item number - for example for large or recurring orders. It is defined which columns per row are visible (e.g. item number, quantity). On demand, the system remembers the most recently used row count via saveCountInSession. Below is an example configuration for checkout.directOrder:

Parameter overview

checkout.productDependency - Product dependencies

This section defines when certain steps or options are allowed in checkout. To do so, it checks the contents of the basket - such as properties like size, colour, or whether an additional field is filled in - and can display a notice or block the action if not fulfilled. Typical use cases include mandatory accessories or preventing forbidden combinations in checkout. Below is an example configuration for checkout.productDependency:

Evaluation logic

The rule groups and conditions are evaluated according to a fixed scheme:
  • dependencyGroups are OR-linked: It is sufficient for one of the groups to be fully satisfied.
  • dependencies within a group are AND-linked: Within a group, all conditions must be satisfied.
  • Whether a single condition is considered satisfied is additionally controlled by basketBehavior: With matchOnce, at least one basket line item must satisfy the condition; with matchAll, all line items for which the checked field returns a value.
In the example above, the dependency is therefore considered satisfied if either the first group applies (one line item with the colour camel and one line item with an empty free field engraving in the basket) or the second group (one line item with size S, M or L).

Parameter overview

Check types (type)

checkout.shippingMethod - Shipping methods

Defines available shipping methods and their behaviour in checkout. In addition to activation, name and order notes, price scales by weight (weightCost) and by basket subtotal (basicCost) can be configured. Via validations (validations), conditions such as allowed countries, physical products only or further rules can be set. Additionally, description, image/icon and external link (e.g. carrier info) are possible. Via the group field, a shipping method can also be assigned to a shipping method group. This produces clearly named, rule-compliant shipping options with transparent price logic and optional restrictions. Below is an example configuration for checkout.shippingMethod:

Parameter overview

checkout.shippingMethodGroup - Shipping method groups

Defines groups into which shipping methods can be combined (e.g. by provider or delivery type). A shipping method is assigned to a group via its group field. Per group, name, description, image and a link can be stored - for example to present several shipping methods bundled and uniformly in the frontend. Below is an example configuration for checkout.shippingMethodGroup:

Parameter overview

In the template, the groups are read via $wsConfig.shippingMethodGroups. The group assigned to a shipping method is available there in the group field of the shipping method.

checkout.shipTrack - Parcel tracking

Configures the connection to shipping service providers for shipment tracking. Stored are the provider identifier and credentials (API user/token) as well as a language code for provider responses and labeling. Based on this data, tracking links and status information can be provided in checkout or in the customer account and used automatically in notifications. Below is an example configuration for checkout.shipTrack:

Parameter overview