QUALITY PATCH

MDVA-32776: The stock status is not updated when an order is placed but not shipped

The stock status is not updated when an order is placed but not shipped. Quality patch MDVA-32776 for magento/module-inventory-indexer applies to Magento Open Source and Adobe Commerce 2.4.0 to 2.4.1-p1.

Categories
Inventory
Components
magento/module-inventory-indexer
Origin
adobe-commerce-support
Since QPT
1.1.6

Issue

The stock status is not updated when an order is placed but not shipped.

Steps to reproduce

1. Create two simple products with qty = 11 and 22. 1. Create a grouped product using the simple products created in step one. 1. Add grouped products to the cart by setting one of the product qty to 11 and making the other simple product go out of stock. 1. Complete the checkout and place the order.

Adobe's page lists 2.4.0 - 2.4.1-p1 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.

Install

Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply MDVA-32776. On Cloud, add MDVA-32776 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its MDVA-32776/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.

Patch files and compatible versions

Packages across compatible versions (1): magento/module-inventory-indexer
Packages across compatible versions (1): magento/module-inventory-indexer

magento/inventory-metapackage >=1.2.0 <1.2.2

Magento Open Source
2.4.1-p1, 2.4.1, 2.4.0-p1, 2.4.0
Adobe Commerce
2.4.1-p1, 2.4.1, 2.4.0-p1, 2.4.0
Patch file
patches/os/MDVA-32776_1.2.0.patch
  • vendor/magento/module-inventory-indexer/Model/Queue/GetSalabilityDataForUpdate.php (added)
  • vendor/magento/module-inventory-indexer/Model/Queue/UpdateIndexSalabilityStatus.php
  • vendor/magento/module-inventory-indexer/Model/Queue/UpdateIndexSalabilityStatus/IndexProcessor.php
  • vendor/magento/module-inventory-indexer/Model/Queue/UpdateIndexSalabilityStatus/UpdateLegacyStock.php (added)
  • vendor/magento/module-inventory-indexer/Model/ResourceModel/UpdateLegacyStockStatus.php (added)

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.