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
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:
- Create a configurable product with two associated products. For example: simple products Red and Brown.
- Set inventory of the simple product Red, and set Stock Status to In Stock, then set the Enable Product status to No.
- Set inventory of the simple product Brown, then set the Enable Product status to Yes.
- Make sure the configurable product Stock Status is In Stock.
- Change the inventory of the simple product Brown to 0 and set the Stock Status to Out of Stock.
- At this point, the configurable product Stock Status is still In Stock.
- Perform reindex.
- Check the
min_price
andmax_price
for the configurable product in thecatalog_product_index_price
DB table - the two values are set to 0. - But if we set the configurable product Stock Status to Out of stock and do reindex, then we can see non-zero
min_price
andmax_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:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in the support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in the Quality Patches Tool guide.
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.