MDVA-34850: swatches not strike-through inventory reaches “0”

The MDVA-34850 patch fixes the issue where the swatches are not stricken through when the inventory reaches “0” and are not visible in the Product Details Page (PDP) link to any other In-Stock swatches. The Display Out-of-Stock Products is also set to Yes in admin configuration. This patch is available when the Quality Patches Tool (QPT) 1.0.17 is installed. Please note that the issue was fixed in Adobe Commerce 2.4.3.

Affected products and versions

The patch is created for Adobe Commerce version:

Adobe Commerce on cloud infrastructure 2.3.5-p2

Compatible with Adobe Commerce versions:

Adobe Commerce on-premises and Adobe Commerce on cloud infrastructure 2.3.1 - 2.4.2

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

Out-of-Stock Product options do not display on the PDP page when the default inventory stock is not in use and Display Out-of-Stock Products configuration is enabled.

Prerequisites:

Steps to reproduce:

  1. Create new inventory stock [New Stock], assigning all the websites to it and the above source. Now the Default Stock should not be in use.
  2. Create a configurable product adding three size options [S,M,L].
  3. Open each option and add quantities by assigning only the custom source [new_source] created. Also, set [Source Status] to [In Stock].
  4. Reindex and check the configurable product from the frontend. All three options should be visible.
  5. Open a simple product assigned to [size:S] from the backend and set the [Source Status] to [Out of Stock], also update the quantity to 0. Reindex and check the configurable product from the frontend.

Expected results:

Since the Display Out-of-Stock Products option is enabled, all three options should display. The Out-of-Stock option [S] should be disabled and crossed out. It should display 2 x of 1 option product with price = 12x2 in order details on the frontend and backend.

Actual results:

The Out-of-Stock option is hidden.

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 the Patches available in QPT section.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a