QUALITY PATCH

ACSD-56158: The tax value rendering in the GraphQL response is incorrect…

The tax value rendering in the GraphQL response is incorrect when multiple tax rules are applied to the cart. Quality patch ACSD-56158 for magento/module-quote-graph-ql applies to Magento Open Source and Adobe Commerce 2.4.5 to 2.4.6-p15.

Categories
GraphQL, Price/Tax
Components
magento/module-quote-graph-ql
Origin
adobe-commerce-support
Since QPT
1.1.44

Issue

The tax value rendering in the GraphQL response is incorrect when multiple tax rules are applied to the cart.

Steps to reproduce

1. Create a customer with a US address. 1. Navigate to the Admin Panel. 1. Create a product with a price of $100. 1. Create two tax rates for the US address: one for 10% and the other for 5%. 1. Configure two tax rules for USA from Stores > Taxes > Tax Rule. 1. Assign one tax rate to one rule. 1. From the frontend, log in as the customer with the US address, and add the product to the cart. 1. Generate a customer token via GraphQL. 1. Generate a cart ID via GraphQL. 1. Check that the tax applied is correct by getting the customer's cart via GraphQL: { cart(cart_id: "o3Yqt6zkn8ncOzFxGnR1IWdT..") { id email billing_address { city country { code label } firstname lastname company postcode vat_id region { code label } street telephone } shipping_addresses { firstname lastname company street city postcode vat_id region { code label } country { code label } telephone available_shipping_methods { amount { currency value } available carrier_code carrier_title error_message method_code method_title price_excl_tax { value currency } price_incl_tax { value currency } } selected_shipping_method { amount { value currency } carrier_code carrier_title method_code method_title } } available_payment_methods { code title } selected_payment_method { code title } applied_coupons { code } prices { grand_total { value currency } subtotal_excluding_tax { value currency } subtotal_including_tax { value currency } applied_taxes { label amount { currency value } } } } }

Adobe's page lists 2.4.5-p5 - 2.4.6-p3 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.

Adobe scheduled the permanent fix for 2.4.7.

Install

Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-56158. On Cloud, add ACSD-56158 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-56158/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.

Patch files and compatible versions

Packages across compatible versions (1): magento/module-quote-graph-ql
Packages across compatible versions (1): magento/module-quote-graph-ql

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.