The MDVA-28300 Magento patch fixes the issue where GraphQL request doesn't reflect the price changes from catalog price rules. This patch is available when the Magento Quality Patch (MQP) tool v.1.0.6 is installed. Please note that the issue was fixed in Magento version 2.3.6.
Affected products and versions
The patch is created for Magento version:
Magento Commerce 2.3.5-p1
Compatible with Magento versions:
Magento Commerce/ Magento Commerce Cloud 2.3.0 - 2.3.5-p2
Note: the patch can be applicable to other versions. To check if the patch is compatible with your Magento version, run ./vendor/bin/magento-patches status
.
Issue
When a catalog price rule is applied to a certain customer group, items prices in the cart and order total are not calculated correctly in GraphQL.
Steps to reproduce:
- Create a new customer account and change its Customer Group to Wholesale.
- Create a new Catalog rule in Marketing > Promotions > Catalog Price Rules with the following parameters:
- Customer Groups: WholesaleActions:
- Apply: Apply as percentage of original
- Discount: 50
- Customer Groups: WholesaleActions:
- Create a new product with price=100.
- Log in to the frontend using the previously created customer account (if you were already logged in, log out and log in again).
- Add the product to the cart. The price of the product is 50 (regular price 100) and Order Total: 55 (50 + 5 of shipment cost).
- Execute the GraphQL API call described in customerCart query in Magento Developer Documentation.
Expected result:
Both API and frontend have the same order total with the discount introduced by the catalog rule being applied.
Actual result:
The total of the order doesn't apply the catalog rule discount.
Apply the patch
To apply individual patches use the following links depending on your Magento product:
- Magento Commerce: DevDocs Apply patches using Magento Quality Patches Tool.
- Magento Commerce Cloud: DevDocs Upgrades and Patches > Apply patches.
Related reading
To learn more about Magento Quality Patches, refer to: