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

feat(medusa,core-flows): update cart adjustments on item updates #6539

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

riqwan
Copy link
Contributor

@riqwan riqwan commented Feb 28, 2024

No description provided.

Copy link

changeset-bot bot commented Feb 28, 2024

🦋 Changeset detected

Latest commit: f539785

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

This PR includes changesets to release 2 packages
Name Type
@medusajs/core-flows Patch
@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

vercel bot commented Feb 28, 2024

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

Name Status Preview Comments Updated (UTC)
api-reference 🔄 Building (Inspect) Visit Preview Feb 28, 2024 4:46pm
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2024 4:46pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
docs-ui ⬜️ Ignored (Inspect) Visit Preview Feb 28, 2024 4:46pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Feb 28, 2024 4:46pm

async (data: StepInput, { container }) => {
const { promo_codes = [], id, action = PromotionActions.ADD } = data

await updateCartPromotionsWorkflow(container).run({
Copy link
Contributor

Choose a reason for hiding this comment

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

love this! 🎆

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.

LGTM

createLineItemAdjustmentsStep({ lineItemAdjustmentsToCreate }),
createShippingMethodAdjustmentsStep({ shippingMethodAdjustmentsToCreate })
)
const retrieveCartInput = {
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Can we do this? I didn't know that. Thought everything had to be either a step or transformer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We changed it recently to allow plain objects as well. You only need the transformer if its an unresolved object.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's great

Copy link
Contributor

Choose a reason for hiding this comment

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

one can't keep up with so many improvements 😆

Copy link
Contributor

Choose a reason for hiding this comment

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

Haha, let's keep it that way 🏎️

@riqwan riqwan merged commit 557d86a into develop Feb 28, 2024
17 checks passed
@riqwan riqwan deleted the feat/refresh-cart branch February 28, 2024 18:35
@github-actions github-actions bot mentioned this pull request Feb 28, 2024
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