Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue where the discount value displayed in the cart gets the tax subtracted twice when displaying prices excluding tax. #1824

Open
wants to merge 4 commits into
base: canary
Choose a base branch
from

Conversation

SimonPrins
Copy link
Contributor

… subtracted twice when displaying prices excluding tax.

… subtracted twice when displaying prices excluding tax.
@changeset-bot
Copy link

changeset-bot bot commented Mar 1, 2023

🦋 Changeset detected

Latest commit: 13ba96a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 66 packages
Name Type
@graphcommerce/magento-cart Patch
@graphcommerce/googleanalytics Patch
@graphcommerce/magento-cart-billing-address Patch
@graphcommerce/magento-cart-checkout Patch
@graphcommerce/magento-cart-coupon Patch
@graphcommerce/magento-cart-email Patch
@graphcommerce/magento-cart-items Patch
@graphcommerce/magento-cart-payment-method Patch
@graphcommerce/magento-cart-shipping-address Patch
@graphcommerce/magento-cart-shipping-method Patch
@graphcommerce/magento-newsletter Patch
@graphcommerce/magento-payment-adyen Patch
@graphcommerce/magento-payment-braintree Patch
@graphcommerce/magento-payment-included Patch
@graphcommerce/magento-payment-klarna Patch
@graphcommerce/magento-payment-multisafepay Patch
@graphcommerce/magento-payment-paypal Patch
@graphcommerce/magento-product-bundle Patch
@graphcommerce/magento-product-configurable Patch
@graphcommerce/magento-product-downloadable Patch
@graphcommerce/magento-product-grouped Patch
@graphcommerce/magento-product-simple Patch
@graphcommerce/magento-product-virtual Patch
@graphcommerce/magento-product Patch
@graphcommerce/magento-wishlist Patch
@graphcommerce/mollie-magento-payment Patch
@graphcommerce/magento-graphcms Patch
@graphcommerce/magento-cart-pickup Patch
@graphcommerce/demo-magento-graphcommerce Patch
@graphcommerce/googletagmanager Patch
@graphcommerce/magento-category Patch
@graphcommerce/magento-pagebuilder Patch
@graphcommerce/magento-review Patch
@graphcommerce/docs Patch
@graphcommerce/browserslist-config-pwa Patch
@graphcommerce/changeset-changelog Patch
@graphcommerce/eslint-config-pwa Patch
@graphcommerce/graphql-codegen-near-operation-file Patch
@graphcommerce/graphql-codegen-relay-optimizer-plugin Patch
@graphcommerce/next-config Patch
@graphcommerce/prettier-config-pwa Patch
@graphcommerce/typescript-config-pwa Patch
@graphcommerce/cli Patch
@graphcommerce/ecommerce-ui Patch
@graphcommerce/framer-next-pages Patch
@graphcommerce/framer-scroller Patch
@graphcommerce/framer-utils Patch
@graphcommerce/googlerecaptcha Patch
@graphcommerce/graphcms-ui Patch
@graphcommerce/graphql-mesh Patch
@graphcommerce/graphql Patch
@graphcommerce/image Patch
@graphcommerce/lighthouse Patch
@graphcommerce/lingui-next Patch
@graphcommerce/magento-cms Patch
@graphcommerce/magento-customer-account Patch
@graphcommerce/magento-customer-order Patch
@graphcommerce/magento-customer Patch
@graphcommerce/magento-graphql Patch
@graphcommerce/magento-search Patch
@graphcommerce/magento-store Patch
@graphcommerce/next-ui Patch
@graphcommerce/react-hook-form Patch
@graphcommerce/framer-next-pages-example Patch
@graphcommerce/framer-scroller-example Patch
@graphcommerce/image-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Mar 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
graphcommerce ❌ Failed (Inspect) Jul 26, 2024 1:29pm
graphcommerce-hygraph-dynamic-rows-ui ❌ Failed (Inspect) Jul 26, 2024 1:29pm
magento-2.4.7 ❌ Failed (Inspect) Jul 26, 2024 1:29pm

@paales
Copy link
Member

paales commented Mar 1, 2023

@SimonPrins
Copy link
Contributor Author

This issue happens when you have both Magento and GC configured to display prices excluding taxes.
Magento will provide the discount excluding VAT, but then GC also tries to subtract the VAT and the result is an incorrect value.

I am not entirely certain whether the prices incl/excl tax setting for GC is expected to always match the Magento setting, or whether you are supposed to be able to use a different setting for GC than you have for Magento. I suppose it makes sense to be able to vary this, for instance if you have a single Magento install with multiple GC frontends for B2B and B2C.

If the Magento and GC settings are not required to match then this PR will not actually fix the issue, it will only move the problem to installs where Magento is configured for prices including tax and GC is configured to display prices excluding tax.

To fix the issue in both situations I think you would need to have additional information from Magento, for instance if you had both the discount including tax and the discount excluding tax then you can choose which you need. If you could find out which setting Magento is using that would also be helpful in determining whether or not GC needs to subtract VAT.

@paales
Copy link
Member

paales commented Nov 8, 2023

Not sure what to do with this?

@paales paales added the stale label Nov 8, 2023
@paales paales changed the title Fix issue where the discount value displayed in the cart gets the tax… Fix issue where the discount value displayed in the cart gets the tax subtracted twice when displaying prices excluding tax. Jul 26, 2024
Copy link
Contributor

Page Size old Size new Size diff First load old First load new First load diff
/checkout/payment 12.2kB 12.1kB -0.1kB 299kB 299.0kB

Copy link
Contributor

Page Size old Size new Size diff First load old First load new First load diff
/checkout/payment 12.2kB 12.1kB -0.1kB 299kB 299.0kB

Copy link
Contributor

Page Size old Size new Size diff First load old First load new First load diff
/checkout/payment 12.2kB 12.1kB -0.1kB 299kB 299.0kB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants