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

fix(medusa): totals calculation with gift card #5075

Merged
merged 12 commits into from
Oct 25, 2023

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Sep 15, 2023

What
Resolve potential discrepency between what is calculated in the createFromCart and the cart/order totals calculation.
When the giftCard is taxable then the following calculation is applied

cart.subtotal + cart.shipping_total - cart.discount_total

otherwise

 cart.subtotal +
          cart.shipping_total +
          cart.tax_total -
          cart.discount_total

@changeset-bot
Copy link

changeset-bot bot commented Sep 15, 2023

🦋 Changeset detected

Latest commit: 8f913fa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@medusajs/medusa Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Oct 25, 2023 10:16am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Oct 25, 2023 10:16am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Oct 25, 2023 10:16am

@adrien2p adrien2p force-pushed the fix/totals-gift-cart-calculation branch from 8729615 to 8ebda6b Compare September 15, 2023 09:47
@vercel vercel bot temporarily deployed to Preview – api-reference September 15, 2023 12:12 Inactive
@vercel vercel bot temporarily deployed to Preview – medusa-docs September 15, 2023 12:17 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference September 15, 2023 12:23 Inactive
@vercel vercel bot temporarily deployed to Preview – medusa-docs September 15, 2023 12:27 Inactive
@adrien2p
Copy link
Member Author

@olivermrbl let me know when we can discuss that pr

@olivermrbl
Copy link
Contributor

@olivermrbl let me know when we can discuss that pr

Can you add a short description of what changes are introduced in this PR?

@Arsenalist
Copy link
Contributor

Is there any feedback on this change or can we merge it?

@Arsenalist
Copy link
Contributor

I would just like to know if this will be merged or not, or if I have to fork Medusa or not.

@adrien2p adrien2p force-pushed the fix/totals-gift-cart-calculation branch from 164d747 to 253acdf Compare October 17, 2023 07:38
@adrien2p adrien2p marked this pull request as ready for review October 17, 2023 12:35
@adrien2p adrien2p requested a review from a team as a code owner October 17, 2023 12:35
@adrien2p adrien2p requested a review from olivermrbl October 22, 2023 12:19
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

Looks like we need to update a couple of tests before we can merge

@adrien2p
Copy link
Member Author

@olivermrbl should we move this one?

@kodiakhq kodiakhq bot merged commit e64823d into develop Oct 25, 2023
@kodiakhq kodiakhq bot deleted the fix/totals-gift-cart-calculation branch October 25, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants