[PaaS only]{class="badge informative" title="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only."}

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
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

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:

  1. Create a simple product: SKU = p1 with quantity = 10.
  2. Reindex to ensure salable quantity = 10 exists.
  3. Add qty = 10 of the previously created product to the shopping cart by GraphQL request.
  4. In the Admin panel, edit the product and reduce its quantity to 5, then save.
  5. Reindex again.
  6. Try to update the product qty in the shopping cart to <= 5 using a GraphQL request.
  7. 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:

Additional steps required after the patch installation

NOTE
This section is optional; there might be some steps required after applying the patch to fix the issue.

To see the error in GraphQL response, the following section should be added to the request:

errors {
      code
      message
  }

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3