Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Added tax calculation with product_tax_id and user group id#307

Merged
pkarw merged 5 commits into
vuestorefront:developfrom
gastrohero:feature/add-usergroupid-for-product-tax-calculation
Aug 6, 2019
Merged

Added tax calculation with product_tax_id and user group id#307
pkarw merged 5 commits into
vuestorefront:developfrom
gastrohero:feature/add-usergroupid-for-product-tax-calculation

Conversation

@ResuBaka
Copy link
Copy Markdown
Collaborator

This adds the logic so the tax is right when you have multible rules which depends on the user group id.

With this you can set a default user group id when a use is not logged in.

Then you can enable this but disable the use of the user group id which can be useful when you have cases where you want or need to show the taxes in the frontend but not in the cart as there magento calculates the taxes with the right tax class for the user.

@ResuBaka
Copy link
Copy Markdown
Collaborator Author

ResuBaka commented Jul 22, 2019

This is the PR to for this PR in vue-storefront which implements this on the client side.

Copy link
Copy Markdown
Contributor

@pkarw pkarw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice :)

@pkarw pkarw requested a review from lukeromanowicz July 22, 2019 10:05
Comment thread src/api/catalog.js Outdated
url = config.elasticsearch.protocol + '://' + url
}

// Check price tiers
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ResuBaka why checking price tiers part is gone?

Copy link
Copy Markdown
Collaborator Author

@ResuBaka ResuBaka Jul 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed it because I need the user group now too. So it was easier to remove the if and not really needed in the first place, maybe it was needed in some point of the development for the PriceTiers feature or it was there because of performance so you don't need to decode the jwt.

I does not destroy the logic for PriceTiers as it is checked before the actual logic for it is executed anyways.

Which can be seen here and here .

@lukeromanowicz
Copy link
Copy Markdown
Contributor

@pkarw @ResuBaka looks good except one thing. I'm a little bit anxious about removing that tier price part. This PR removes a lot of code so it has to be tested both on magento 1 and magento 2 in scenarios with and without tier prices before merging.

@pkarw
Copy link
Copy Markdown
Contributor

pkarw commented Aug 5, 2019

@ResuBaka can you pleas fix the conflicts?

…to feature/add-usergroupid-for-product-tax-calculation

# Conflicts:
#	CHANGELOG.md
#	config/default.json
#	src/api/catalog.js
#	src/api/user.js
#	src/platform/magento1/tax.js
#	src/platform/magento2/tax.js
@pkarw pkarw merged commit 87280b6 into vuestorefront:develop Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants