ACSD-69541: Cart item quantity can’t be updated via GraphQL after reducing product stock in Admin
The ACSD-69541 patch fixes the issue where reducing a product’s quantity in the Admin panel to less than the quantity already added to the shopping cart prevents updating the cart item quantity via GraphQL. This patch is available when the Quality Patches Tool (QPT) 1.1.76 is installed. The patch ID is ACSD-69541. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.8-p2
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.4 - 2.4.8-p3
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
After a product is added to the shopping cart, reducing its quantity in the Admin panel makes it impossible to update the cart item quantity via GraphQL.
Steps to reproduce:
- Create a simple product: SKU = p1 with quantity = 10.
- Reindex to ensure salable quantity = 10 exists.
- Add qty = 10 of the previously created product to the shopping cart by GraphQL request.
- In the Admin panel, edit the product and reduce its quantity to 5, then save.
- Reindex again.
- Try to update the product qty in the shopping cart to <= 5 using a GraphQL request.
- Try to update the product qty in the shopping cart to to > 5 using a GraphQL request.
Expected results:
The cart item quantity is updated when sufficient quantity is In Stock. If insufficient quantity is available, a valid error message is returned in the GraphQL response.
Actual results:
When updating the cart item quantity to <= 5, a success response from GraphQL occurs, but the product quantity in the shopping cart remains unchanged.
When updating the cart item quantity to > 5, an internal server error is returned instead of a valid 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
Additional steps required after the patch installation
To see the error in GraphQL response, the following section should be added to the request:
errors {
code
message
}
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