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): Account for multiple inventory items in get-inventory #3094

Merged

Conversation

pKorsholm
Copy link
Contributor

What

  • Account for multiple inventory items when getting inventory (setting quantity as the largest fulfillable amount when getting inventory)
  • Adjust quantity accordingly when setting channel availability when getting inventory.

Why

  • in the initial implementation we assumed a 1 to 1 relationship from variant to inventory item.

@changeset-bot
Copy link

changeset-bot bot commented Jan 24, 2023

🦋 Changeset detected

Latest commit: abeda86

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

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

@pKorsholm pKorsholm marked this pull request as ready for review January 24, 2023 10:35
@pKorsholm pKorsholm requested a review from a team as a code owner January 24, 2023 10:35
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, some suggestions

@olivermrbl olivermrbl changed the title fix(Medusa): account for multiple inventory items in get-inventory fix(medusa): Account for multiple inventory items in get-inventory Feb 16, 2023
@olivermrbl
Copy link
Contributor

@pKorsholm Can I get you to resolve conflicts, so we can merge? 🙏

@pKorsholm pKorsholm force-pushed the fix/todo-use-product-variant-method-to-get-sc-availability branch from 49274d1 to 4062974 Compare February 22, 2023 13:18
@srindom
Copy link
Collaborator

srindom commented Feb 28, 2023

@pKorsholm - don't forget this one

@pKorsholm pKorsholm merged commit d61d6c7 into develop Feb 28, 2023
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.

4 participants