-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix negative basket total due to shipping tax residue #13185
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 negative basket total due to shipping tax residue #13185
Conversation
Hi @torreytsui thank you for this pull request. I can see that an integration test to cover this case, or one to make sure that the negative case does not happen any more would be very beneficial here. Would you be able to have a look into this for me? |
HI @dmanners, thanks for the reply. I'm still unable to replicate the issue on vanilla 2.2. It may be caused by some customisation. I will close this PR now. |
Hi @dmanners, I managed to replicate the issue on a vanilla 2.2 env. Updated the steps and could you please have a look and see if you can replicate it on your side? |
Thanks @torreytsui I will see what I can do and update you on the progress. |
@torreytsui thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
Hi @torreytsui. Thank you for your contribution. |
Description
A negative basket total is produced when:
This PR fixes the issue by completing an earlier return on tax total collector that failed to unset taxed shipping total information.
Fixed Issues (if relevant)
No directly related issue found
Manual testing scenarios
Set up tax to 20%
Set up tax settings like below
Sign in on front-end
Add a default shipping address that will result in 20% tax rate
Add a product to basket
Go to checkout page
Select default shipping address and select shipping method
Step to billing (At this point, shipping tax should be calculated and show up on the breakdown)
Go to basket page
Empty the basket by removing the only product from it
Expected result
Basket total should become 0
Actual result
Basket total become negative (e.g., -1)
/customer/section/load/?sections=cart
DEMO
http://recordit.co/vERAS5KL1x
Contribution checklist