Skip to main content

Product sets: How availability calculation works

Shopware 6 — Learn how product sets calculate their available stock, availability and maximum purchase quantity, depending on clearance sale and assigned products.

This article explains how the product set feature calculates the Available stock, the Availability and the Maximum purchase quantity of a product set in the storefront.

The logic depends primarily on the Clearance sale setting on the product set itself and on the assigned (sub)products.

Calculation basics

Term

Meaning

Default calculation basis

Available stock

The maximum quantity that can be ordered in the shop.

The minimum of the available stock of all stock-managed subproducts, divided by the required quantity.

Availability

Indicates whether the product can be purchased.

Either Available stock > 0 or Always available.

Maximum purchase quantity

The maximum quantity allowed in the cart.

The lowest value of Available stock, Maximum purchase quantity in the product and Maximum purchase quantity global.

Clearance sale

The setting that determines whether the product may be sold until stock reaches zero.

Important: Product sets are always flagged as not stock-managed in the system. However, the shop's availability logic is controlled by the availability of the products they contain.

Product set has clearance sale on

If Clearance sale is enabled on the product set, availability is derived directly from the stock of the assigned products.

Assigned products

Available stock

Availability

Maximum purchase quantity

All not stock-managed

-

Available stock > 0

MIN(Available stock; Maximum purchase quantity in the product; Maximum purchase quantity global). Additional cart validation.

Only some not stock-managed

MIN (Available stock / Quantity of the stock-managed subproducts)

Available stock > 0

MIN(Available stock; Maximum purchase quantity in the product; Maximum purchase quantity global). Additional cart validation.

All stock-managed

MIN (Available stock / Quantity of the assigned products)

Available stock > 0

MIN(Available stock; Maximum purchase quantity in the product; Maximum purchase quantity global). Additional cart validation.

All have clearance sale on

Calculation follows the default behavior.

Available stock > 0

MIN(Available stock; Maximum purchase quantity in the product; Maximum purchase quantity global). Additional cart validation.

Product set has clearance sale off

If Clearance sale is disabled on the product set, the product set is shown in the frontend as always available, regardless of the current available stock of the subproducts.

Assigned products

Available stock

Availability

Maximum purchase quantity

All not stock-managed

-

Always available

MIN(Maximum purchase quantity in the product; Maximum purchase quantity global).

Only some not stock-managed

MIN (Available stock / Quantity of the stock-managed subproducts)

Always available

Maximum purchase quantity in the product or Maximum purchase quantity global.

All stock-managed

MIN (Available stock / Quantity of the assigned products)

Always available

Maximum purchase quantity in the product or Maximum purchase quantity global.

All have clearance sale on

See scenario 1, row 4. The clearance sale setting of the product set becomes irrelevant.

Available stock > 0

MIN(Available stock; Maximum purchase quantity in the product; Maximum purchase quantity global). Additional cart validation.

Notes on cart validation

In all cases where Clearance sale is enabled on the product set or on the assigned products, the system performs an additional validation in the cart.

This ensures that the available stock of the assigned products with clearance sale enabled is sufficient even if the same subproduct is included multiple times in different product sets or as a single item in the cart.

Cart message: "… no longer available in this cart constellation …"

For a product set, the cart can show the message Das Produkt ist in dieser Warenkorbkonstellation nicht mehr verfügbar. Es kann nur 0 mal … bestellt werden. It comes from the check in the cart: The shop displayed the product set as available, but an assigned product is not available in a sufficient quantity.

To make a product set appear as unavailable in the shop as soon as a component is missing, enable clearance sale on the main product of the product set.

Note: If an assigned product is inactive but still has stock, it does not make the product set unavailable.

Did this answer your question?