ACP2E-5071: Stock unavailability message isn’t always displayed on product page when shopper’s cart contains full available quantity
The ACP2E-5071 patch fixes the issue where the stock unavailability message is not always displayed on the product page when the shopper’s cart already contains the full available quantity. This patch is available when the Quality Patches Tool (QPT) 1.1.86 is installed. The patch ID is ACP2E-5071. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.10.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.8
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.7 - 2.4.9
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
The stock unavailability message is not always displayed on the product page when the shopper’s cart already contains the full available quantity.
Prerequisites:
Full page cache enabled (built-in, Varnish, or Fastly).
Steps to reproduce:
- In the Admin panel, go to Catalog > Products and create a simple product (Add Product > Simple Product) or open an existing one.
- Set Quantity to 2 and Stock Status to In Stock, and click Save. If there are several inventory sources, set Qty to 2 for the assigned source in the Sources section instead.
- As a guest in a private browser window, open the product page on the Storefront and reload it once so that it is served from the full page cache.
- Set Qty to 2 and click Add to Cart.
- To make the issue easier to reproduce, open the browser developer tools and, in the Performance panel, set CPU throttling to 6x slowdown.
- Set Qty to 1 and click Add to Cart. The page reloads and shows a stock error message, for example: Not enough items for sale.
- Click Add to Cart again many times, up to a few dozen, and let the page reload after each click.
Expected results:
- Every failed Add to Cart attempt shows the stock error message.
Actual results:
- After some attempts, the page reloads without showing the error message.
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: A self-service tool for quality patches in the Tools guide