ACP2E-5242: GraphQL uses the store ID as the website ID during add-to-cart requests

The ACP2E-5242 patch fixes the issue where checking product availability while adding items to the cart displays an error indicating that the website cannot be found. This patch is available when the Quality Patches Tool (QPT) 1.1.84 is installed. The patch ID is ACP2E-5242. 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.9

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.9
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

Checking product availability while adding items to the cart displays an error indicating that the website cannot be found.

Steps to reproduce:

  1. Log in to the Admin panel.
  2. Go to Admin > Stores > Settings > All Stores, click Create Store View.
  3. Create a second store view named “store_2”, for example.
  4. Create an empty guest cart with a GraphQL request using the “Store: store2” HTTP header.
  5. Record the returned cart ID.
  6. Add a simple product to the cart with a GraphQL request using the “Store: store2” HTTP header, the product SKU, and the cart ID.

Expected results:

The product is successfully added to the cart via the GraphQL request.

Actual results:

The GraphQL request fails and writes the message “The website with id … that was requested wasn’t found. Verify the website and try again.” to var/log/exception.log.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
commerce-operations-help-tools