ACSD-57086: Orders from non-default websites with terms and conditions enabled are processed incorrectly
The ACSD-57086 patch fixes the issue where orders placed from non-default websites with terms and conditions enabled are not processed correctly. This patch is available when the Quality Patches Tool (QPT) 1.1.49 is installed. The patch ID is ACSD-57086. Please note that this issue was fixed in Adobe Commerce 2.4.7.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.5-p5
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.3 - 2.4.6-p7
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
While using a multi-store setup with AsyncOrder processing, orders placed on any websites/stores other than the main website are rejected due to issues with scope handling in the queue consumer code.
Steps to reproduce:
-
Install RabbitMQ and execute
bin/magento setup:upgrade
to create the queues for RabbitMQ. -
Configure AsyncOrder processing with:
code language-bash bin/magento setup:config:set --checkout-async 1
-
Create a secondary website, a store, and a store view.
-
Create a product that is shared between both websites.
-
Enable terms and conditions:
- Go to Stores > Configuration > Sales > Checkout > Checkout Options.
- Set Enable Terms And Conditions to Yes.
-
Configure terms and conditions for both the websites:
-
Go to Stores > Terms And Conditions > Add New Condition.
-
Use the following settings:
- Condition Name: Anything
- Status: Enabled
- Applied: Manually
- Store View: Default Store View
-
Create another condition for the second website/store view.
-
-
Change the default website by going to Stores > All Stores. Click the second website, check Set as Default and save.
-
Clear the cache with:
code language-bash bin/magento cache:clear
-
Go to the Storefront and add a product to the cart. Proceed to checkout and place an order (you should see a checkbox in the payment method step to accept the terms and conditions).
-
Go back to Admin after placing the order, and change the default website back to the original main website and save.
-
Clear the cache:
code language-bash bin/magento cache:clear
-
Run the following command to start the queue consumer:
code language-bash bin/magento queue:cons:start placeOrderProcessor
Expected results:
Order is fulfilled; it is not automatically rejected.
Actual results:
Order status is rejected with the following comment:
The order wasn’t placed. First, agree to the terms and conditions, then try placing your order again.
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 released: a new tool to self-serve quality patches in our support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in our support knowledge base.
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.