Hi everyone in the Medusa community! I’m running into a persistent issue with a custom seed script in Medusa 2.0, and I could really use your expertise. I’m trying to generate 100 custom products and assign them to a stock location ("Alexander Warehouse"), With my current script i am able to create the 100 dummy products using faker, the issue is when i go to the admin dashboard, all the products show "0 available at 0 location" this is because i havent linked the products to a location which is what i need help with. I cant do it manually from the dashboard because that will take a lot of time so i need to do it with code. Below, is my current code:
In the admin panel, I expect to see:
100 products with prices displayed in ngn (the store’s default currency).
Inventory showing "X available at 1 location" (Alexander Warehouse).
Products categorized under the appropriate collections.
Thanks in advance 🙂