ACSD-49042: The error occurs when a product with infinite backorder cannot be ordered…
The error occurs when a product with infinite backorder cannot be ordered from the storefront. Quality patch ACSD-49042 for magento/module-inventory-indexer applies to Magento Open Source and Adobe Commerce 2.4.4 to 2.4.4-p18.
- Categories
- Inventory
- Components
- magento/module-inventory-indexer, magento/module-inventory-sales
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.27
Issue
The error occurs when a product with infinite backorder cannot be ordered from the storefront.
Steps to reproduce
1. Set the following configuration settings: * Display Out of Stock Products set to Yes. * Backorders set to Allow Qty Below 0. 1. Add a new custom stock and custom source. 1. Assign a product to the custom source and make sure there is an inventory number set for it (For Example: 10). 1. On the product edit page, open Advanced Inventory. Set the minimum quantity in the cart, (For Example: 160). The quantity must be above inventory. 1. Go to the storefront and buy a product to create a reservation. 1. Change the product quantity to 0. The critical point is to save the product from the Admin panel when there is a reservation. 1. Open the product page on the storefront and try to add the product to the cart.
Adobe's page lists 2.4.4 - 2.4.4-p2 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 ACSD-49042. On Cloud, add ACSD-49042 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-49042/ 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
magento/inventory-metapackage >=1.2.4 <1.2.5
- Magento Open Source
- 2.4.4-p18, 2.4.4-p17, 2.4.4-p16, 2.4.4-p15, 2.4.4-p14, 2.4.4-p13, 2.4.4-p12, 2.4.4-p11, 2.4.4-p10, 2.4.4-p9, 2.4.4-p8, 2.4.4-p7, 2.4.4-p6, 2.4.4-p5, 2.4.4-p4, 2.4.4-p3, 2.4.4-p2, 2.4.4-p1, 2.4.4
- Adobe Commerce
- 2.4.4-p18, 2.4.4-p17, 2.4.4-p16, 2.4.4-p15, 2.4.4-p14, 2.4.4-p13, 2.4.4-p12, 2.4.4-p11, 2.4.4-p10, 2.4.4-p9, 2.4.4-p8, 2.4.4-p7, 2.4.4-p6, 2.4.4-p5, 2.4.4-p4, 2.4.4-p3, 2.4.4-p2, 2.4.4-p1, 2.4.4
- Patch file
- patches/os/ACSD-49042_1.2.4.patch
- vendor/magento/module-inventory-indexer/etc/di.xml
- vendor/magento/module-inventory-sales/Model/GetProductAvailableQty.php (added)
- vendor/magento/module-inventory-sales/Model/IsProductSalableCondition/IsSalableWithReservationsCondition.php
- vendor/magento/module-inventory-sales/Model/ResourceModel/IsStockItemSalableCondition/BackordersCondition.php
- vendor/magento/module-inventory-sales/Model/ResourceModel/IsStockItemSalableCondition/MinQtyStockWithReservationsCondition.php (added)
- vendor/magento/module-inventory-sales/etc/di.xml
