-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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): Include Product Collections in Seed command #5510
feat(medusa): Include Product Collections in Seed command #5510
Conversation
🦋 Changeset detectedLatest commit: 7174ea5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@adamlamaa is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
# Conflicts: # packages/medusa/src/commands/seed.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @adamlamaa, only a minor change before we merge :)
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Ignored Deployments
|
What
Implentation of feature request: Support Seeding Product Collections #5508
Allowing Seeding Product Collections from the standard seed.json file and the
medusa seed -f ./data/seed.json
command.Why
Because it is not currently possible to seed Product Collections.
How
By providing
product_collections
in the seed.json file as below:On each product, Product Collections can then be added via
collection_id
Testing
I could not find any automated tests for seeding, so I have tested this manually.
You can test this PR by updating the seed.json to the following:
Then run
Validate that you have the products and product collections imported as expected in your local databse.