Cart Validation

The cart validation feature ensures that the requested quantity of each item in a user's cart is available throughout the checkout process, redirecting users to the cart page if any changes occur.

The cart validation feature allows composable storefront to verify a user's cart at every step during checkout to ensure that the requested quantity of each item is available. If the quantity of an item is reduced, or an item is out of stock and no longer available, the user is redirected to the cart page, and composable storefront displays a global message about the change to the user's cart.

Requirements

The cart validation feature requires SAP Commerce Cloud 2011 or newer.

Enabling Cart Validation

To enable cart validation, set the enabled flag to true in the cart validation configuration. The following is an example:

cart: {
  validation: {
    enabled: true
  }
}

Configuring

Cart validation is enabled for every step in the checkout process. You can turn off validation for any individual step by removing the CartValidationGuard class from the CMS component configuration in the relevant checkout module.

Extending

No special extensibility is available for this feature.