MDVA-40488: Configurable products with out-of-stock child products not shown in correct price range

The MDVA-40488 patch solves the issue where configurable products with out-of-stock child products are not shown in their correct price range. This patch is available when the Quality Patches Tool (QPT) 1.1.9 is installed. The patch ID is MDVA-40488. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.4.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.2-p1

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.2 - 2.4.3-p1
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

Configurable products with out-of-stock child products are not shown in their correct price range.

Prerequisites:

Go to the Commerce Admin > stores > configuration > catalog > Inventory > stock options and set Display Out of Stock Products configuration to Yes.

Steps to reproduce:

  1. Create a configurable product with two associated products. For example: simple products Red and Brown.
  2. Set inventory of the simple product Red, and set Stock Status to In Stock, then set the Enable Product status to No.
  3. Set inventory of the simple product Brown, then set the Enable Product status to Yes.
  4. Make sure the configurable product Stock Status is In Stock.
  5. Change the inventory of the simple product Brown to 0 and set the Stock Status to Out of Stock.
  6. At this point, the configurable product Stock Status is still In Stock.
  7. Perform reindex.
  8. Check the min_price and max_price for the configurable product in the catalog_product_index_price DB table - the two values are set to 0.
  9. But if we set the configurable product Stock Status to Out of stock and do reindex, then we can see non-zero min_price and max_price values of the configurable product.

Expected results:

If all child products are Out of Stock and the configurable product itself is also Out of Stock, the price is calculated by using all the child products.

Actual results:

The min_price and max_price values for the configurable product in the catalog_product_index_price DB table are set to 0 when the configurable stock status is In stock, but if it’s Out of Stock they become non-zero values.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3