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): Remove shipping on updates to cart.items #4715

Merged
merged 5 commits into from
Aug 8, 2023

Conversation

olivermrbl
Copy link
Contributor

@adrien2p, what do you think about this? Resolves #4707

I think it's reasonable to remove the method on line item updates to always ensure correct shipping on the cart.

The more elegant way would be to validate if the shipping method is still applicable given the update to the items, but that is a more extensive change that I don't know if we should do given we will be modularizing the cart + shipping soon.

@vercel
Copy link

vercel bot commented Aug 8, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Aug 8, 2023 0:53am

@changeset-bot
Copy link

changeset-bot bot commented Aug 8, 2023

🦋 Changeset detected

Latest commit: 75999ae

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

Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

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

LGTM, i think it is fine to remove the methods completely when we update the items ✅

@olivermrbl olivermrbl changed the title Fix/rm shipping on line item update fix(medusa): Remove shipping on updates to cart.items Aug 8, 2023
@olivermrbl olivermrbl marked this pull request as ready for review August 8, 2023 11:34
@olivermrbl olivermrbl requested a review from a team as a code owner August 8, 2023 11:34
@olivermrbl
Copy link
Contributor Author

/snapshot-this

@olivermrbl olivermrbl merged commit a2d7540 into develop Aug 8, 2023
@olivermrbl olivermrbl deleted the fix/rm-shipping-on-line-item-update branch August 8, 2023 12:53
@github-actions github-actions bot mentioned this pull request Aug 8, 2023
@SimonsThijs
Copy link
Contributor

Crazy quick fix! thanks!

If i am not mistaken you missed the addOrUpdateLineItems function.

@olivermrbl
Copy link
Contributor Author

Right, thx @SimonsThijs!

Now that you've seen what needs to be added, would you be up for tackling this one?

@SimonsThijs
Copy link
Contributor

Yes, should be no problem.

@olivermrbl do you want me to just make a new pull request?

@olivermrbl
Copy link
Contributor Author

That would be great, thanks!

@SimonsThijs
Copy link
Contributor

Alright #4725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shipping methods are never removed when line item is removed or added from cart
3 participants