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

Incorrect value of the reduced price in the cart #2892

Closed
2 of 5 tasks
GabiDivante opened this issue May 13, 2019 · 3 comments
Closed
2 of 5 tasks

Incorrect value of the reduced price in the cart #2892

GabiDivante opened this issue May 13, 2019 · 3 comments
Labels
5: Complex bug Bug reports P2: Important Priority mark - still high ;) QA approved after merge Testers will add this label after positive check on merged changes QA approved on branch Testers will add this label after positive check on specific branch.
Milestone

Comments

@GabiDivante
Copy link
Collaborator

GabiDivante commented May 13, 2019

Current behavior

Selection_031

Currently, then reduced price visible in the cart is not correctly calculated:
Reduced price = (net price * discount) + (net price * tax)

For example:
Net product price is 24, tax (23%) is 5.92 - so the full price of the product is 29.92.
The customer adds a 50% discount coupon.
Reduced price = (24 * 0,5) + (24 * 0,23) = 12 + 5,92 = 17,92

Despite this, all values ​​shown in the summary are correct, the client pays the correct amount.

Expected behavior

The tax value should also be reduced by the discount.
Reduced price = (net price * discount) + ((net price * discount) * tax)
So the tax after the reduction is 2.76, and the correct reduced price of the product is 14.76.

Steps to reproduce the issue

  1. Go to https://demo.storefrontcloud.io/
  2. Add any product to the cart
  3. Apply discount code 'mmtest' (-50% discount)

Can you handle fixing this bug by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Environment details

  • Browser: Chrome 73
  • OS: Ubuntu 18.04 LTS

Additional info

The same happens when any other discount rule is applied (any cart or catalog price rule).

@pkarw
Copy link
Collaborator

pkarw commented May 14, 2019

I'd suggest starting checking how Microcart/Product.vue displays the special prices - then go thru taxcalc.js to check if we don't have a flaw there; checking the Magento2 tax settings would be also recommended

@pkarw pkarw added 5: Complex P2: Important Priority mark - still high ;) labels May 14, 2019
@pkarw
Copy link
Collaborator

pkarw commented May 17, 2019

Fixed! :)

pkarw added a commit that referenced this issue May 17, 2019
@pkarw pkarw added the QA - Ready for tests This is notification for testers, that improvement is ready to be tested and verified. label May 17, 2019
@pkarw pkarw added this to the 1.10.0-rc.1 milestone May 17, 2019
@GabiDivante
Copy link
Collaborator Author

@pkarw It works fine :) Though, I haven't thought about the order summary in the checkout, we have to change it the same way
Selection_038
By the way, take a look at my comments in #2874 - we have to solve the problem of displaying reduced prices (or correct value of discount) in instant checkout.

@GabiDivante GabiDivante removed the QA - Ready for tests This is notification for testers, that improvement is ready to be tested and verified. label May 20, 2019
@GabiDivante GabiDivante added the QA approved on branch Testers will add this label after positive check on specific branch. label May 30, 2019
@patzick patzick added the QA - Ready for tests This is notification for testers, that improvement is ready to be tested and verified. label Jun 11, 2019
@alinadivante alinadivante added QA approved after merge Testers will add this label after positive check on merged changes and removed QA - Ready for tests This is notification for testers, that improvement is ready to be tested and verified. labels Jun 14, 2019
@pkarw pkarw assigned patzick and unassigned patzick Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5: Complex bug Bug reports P2: Important Priority mark - still high ;) QA approved after merge Testers will add this label after positive check on merged changes QA approved on branch Testers will add this label after positive check on specific branch.
Projects
None yet
Development

No branches or pull requests

4 participants