magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

Product custom option pricing ignores tax calculation settings #37430

Open bentideswell opened 1 year ago

bentideswell commented 1 year ago

Preconditions and environment

Steps to reproduce

  1. Create new simple product and set price as 0.00 and add a custom option with a fixed price of $10.00
  2. Navigate to Stores > Configuration > Sales > Tax
  3. Change 'Calculation Settings > Catalog Prices' to 'Includes Tax'
  4. Change 'Price Display Settings > Display Product Prices in Catalog' to 'Including Tax'
  5. Change 'Shopping Cart Display Settings > Display Prices' to 'Including Tax'
  6. Change 'Default Tax Calculation Destination' to 'United Kingdom'
  7. Setup a 20% tax rule that is auto applied to the United Kingdom.
  8. Browse to the product on the frontend and view the option price

Expected result

The website is configured to input prices including tax and then display them including tax. The product has a price of $0.00 and the option has a price of $10.00 so the option should display at $10.00. When added to the cart with this option, the price should be $10.00.

Actual result

The option price is $12.00 (assuming a 20% tax rate), which is incorrect. Product pricing is configured to be entered including tax so the $10 entered for the option should not have tax added to it.

Additional information

I first noticed this bug on 2.4.3-p3 but have tested this on a 2.4.6 CE install for this bug report and confirm it is still there.

When product prices are entered inculding tax and configured to display including tax, tax is added to option price, which is incorrect as this has been entered including tax.

I have since noticed that this bug only exists when setting the tax rule for the UK (which is what my client uses). When using the US, this does not occur. The only difference here potentially is the State field.

As a workout around users must enter their product custom option prices excluding tax. This is confusing as all other pricing on the site is entered inclusive of tax.

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @bentideswell. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

bentideswell commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @bentideswell. Thank you for your request. I'm working on Magento instance for you.

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

magento-deployment-service[bot] commented 1 year ago

Hi @bentideswell, here is your Magento Instance: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering Admin access: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering/admin_c6dc Login: 422e9745 Password: 07ec4d0bca87

bentideswell commented 1 year ago

Issue recreated using the provided Magento instance here

You can see option price being displayed as $12.00 but price was entered as $10.00.

I had to change the tax country and default country to the United Kingdom as setting it as the United States didn't trigger the error. I've edited the initial comment/steps to include this. I've also tried using France and Ireland and both also had the bug present. Only the US did not.

engcom-Bravo commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo, here is your Magento Instance: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering Admin access: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering/admin_82e0 Login: d8e60e0c Password: 2f708bcd0126

bentideswell commented 1 year ago

@engcom-Bravo If it's helpful, I have an instance here that is configured to replicate the bug.

The option price was entered as $10 and product pricing configured to be entered inclusive and display inclusive, so it should display as $10, but you can see it as $12 in the custom options dropdown.

engcom-Bravo commented 1 year ago

Hi @bentideswell,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2023-04-27 at 4 21 58 PM Screenshot 2023-04-27 at 4 16 46 PM

Shopping-Cart (7)

We have created tax rule for united kingdom and default country set to united kingdom.The custom Price showing $ 10.00.

Kindly recheck the behaviour on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.

Please let us know if we are missing anything.

Thanks.

bentideswell commented 1 year ago

@engcom-Bravo did you set the price display and price calculation settings to Include Tax? This is the key part that causes the issue.

I can reconfigure your instance to show the error, however the instance is no longer available

engcom-Bravo commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo, here is your Magento Instance: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering Admin access: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering/admin_3254 Login: 7755635e Password: c8efd05b8b09

engcom-Bravo commented 1 year ago

Hi @bentideswell,

Thanks for your update.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

We have set the price display and price calculation settings to Including tax.

Configuration-Settings-Stores-Magento-Admin (5)

Screenshot 2023-05-04 at 3 42 10 PM

We have created tax rule for united kingdom and default country set to united kingdom, but still Product custom price showing $10.00.

Kindly recheck the behaviour on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.

Thanks.

bentideswell commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @bentideswell. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @bentideswell, here is your Magento Instance: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering Admin access: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering/admin_ed9e Login: 0673aa5b Password: 4f37f3dbbb23

bentideswell commented 1 year ago

I've tested and I had missed a step which I thought wasn't relevant but was. Here are the updated steps:

Updated Steps to reproduce

The extra step is setting the 'Shopping cart Display Settings > Display Prices' to 'Including Tax' and flushing the full page cache (or just resaving the product).

I wouldn't have thought this setting would affect the product view page as we are not in the cart yet, but setting this and flushing the cache changes the option price to $12.00.

You can see this here on the latest instance I generated (if it's still up) but here's a screenshot:

product-incorrect-option-price

engcom-Bravo commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo, here is your Magento Instance: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering Admin access: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering/admin_615b Login: ab629809 Password: 535447dd4eea

engcom-Bravo commented 1 year ago

Hi @bentideswell,

Thanks for your update.

Verified the issue on Magento 2.4-develop instance and the issue is reproducible. Kindly refer the screenshots.

Steps to reproduce

Custom Price showing $12.00 which is incorrect.It should show $10.00 as per the configuration.

Screenshot 2023-05-05 at 2 16 20 PM

It is Working fine with US Tax Rule.

Screenshot 2023-05-05 at 2 32 55 PM

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 1 year ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-8709 is successfully created for this GitHub issue.

m2-assistant[bot] commented 1 year ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

rostilos commented 1 year ago

@magento I am working on this

rostilos commented 1 year ago

@bentideswell

After a little research on the functionality, I can conclude that if the taxes for origin country of shipping, set in the configuration, and the default destination country in the tax calculation settings are different, then the customer tax will be added to the amount of product ( Instead of a store tax ). 2023-05-25_19-34 2023-05-25_19-33

Perhaps the option "Cros Border Trade" can provide the desired calculations. Or set the original country of delivery as UK (if the store does not intend to trade cross-border) 2023-05-25_19-23

@engcom-Bravo Just want to clarify: is this really a bug, or this behavior is expected?

LucScu commented 6 months ago

@magento give me 2.4.6-p3 instance

magento-deployment-service[bot] commented 6 months ago

Hi @LucScu. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 6 months ago

Hi @LucScu, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

LucScu commented 6 months ago

@magento give me 2.4.6-p3 instance

magento-deployment-service[bot] commented 6 months ago

Hi @LucScu. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 6 months ago

Hi @LucScu, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

LucScu commented 5 months ago

@magento give me 2.4.6-p3 instance

magento-deployment-service[bot] commented 5 months ago

Hi @LucScu. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 5 months ago

Hi @LucScu, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

LucScu commented 5 months ago

@magento-team Does the automatic instance deployment feature no longer work?

LucScu commented 5 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 5 months ago

Hi @LucScu. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 5 months ago

Hi @LucScu, here is your Magento Instance: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering Admin access: https://ab81156ae7abd5c9da29e584face3978.instances-prod.magento-community.engineering/admin_5b71 Login: 77123c4c Password: 2030bd2182a8