-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Feature/add usergroupid for product tax calculation #3245
Feature/add usergroupid for product tax calculation #3245
Conversation
…roduct This is needed as magento uses both for tax calculation. This does only work on client side tax calculations.
Cool; but two more things:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do apply this logic to vue-storefront-api as well + add the support for dynamic groupId
Did something change in vue-storefront because when I use my local Installation 1.9.0-rc2 then For the api I would make an Issue for or i need to see how much time I have to work on it. Then what do you mean by dynamic groupId? |
To be poerfectly honest with you - I'm not sure how this is being set :) @mdanilowicz was in charge of tier prices few months ago and add this dynamic groups mechanism by this change. But youre' right the group_id property should be on user as well so we could use it - but please just make sure it's the same with m2 and m1 as well |
I just found out to things first The second one is that we need to redo all our tax calculation when a user login and his groupId is different from the one that is in the config. |
I need to change the code of PriceTiers a bit as I need to use the user groupId/groupToken as well and not only PriceTiers alone. So we need to test that too after I am finished with the implementation. |
…tion Moved checks and user group id into functions to reused that code at some more places.
…tion Moved checks and user group id into functions to reused that code at some more places.
…eature/add-usergroupid-for-product-tax-calculation
The PR for adding this also to the API can be found here. |
Thanks @ResuBaka ! |
I have updated the
calculateProductTax
to get the new feature to work.This does only work when you set the tax.userGroupId to a number and have sourcePriceIncludesTax and calculateServerSide set to
false
.Short description and why it's useful
This is adds tax calculation with product_tax_class_ids and customer_tax_class_ids.
We had the problem that when only the product_tax_class_ids we get the wrong taxes on a product to so we need to use both product_tax_class_ids and customer_tax_class_ids to get the right tax class for a product.
Which environment this relates to
Check your case. In case of any doubts please read about Release Cycle
develop
branch and want to merge it back todevelop
release
branch and want to merge it back torelease
hotfix
ormaster
branch and want to merge it back tohotfix
Upgrade Notes and Changelog
IMPORTANT NOTICE - Remember to update
CHANGELOG.md
with description of your changeContribution and currently important rules acceptance