-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improperly referenced product id when parsing CSV for bulk product update via import strategy #2350
Comments
Hey ,I would like to work on this issue . |
Go for it! I have actually already fixed it in another project where I'm actually using medusa, I just haven't done the same on my forked version of it but if you'd like to fix it, you're more than welcome. |
Thanks @a-finocchiaro . |
Nice catch @a-finocchiaro and appreciate the contribution @ayushthe1 💪 |
Thanks . Would have liked to fully fix the issue but currently I don't know much. |
…tegy (#2351) * What - fixing PR #2350 * Why - In the ProductImportStrategy class, the getImportInstructions improperly checks the product.id for each row. With it setup this way, products will always be considered new because the product.id column is not read here. So products will never be updated. [Link to the code line](https:/medusajs/medusa/blob/bd941309161bcee4fbfc7918d310c426ba8d8f15/packages/medusa/src/strategies/batch-jobs/product/import.ts#L166) * How - Replacing `row["product.product.id"]` to `row["product.id"]` Co-authored-by: Oliver Windall Juhl <[email protected]>
Solved #2351 Again, thanks for the contribution. To show our appreciation, we'd love to send you some swag/merch. If that's of interest reach out to me on our Discord and we'll make it happen! 💪 |
…tegy (#2351) * What - fixing PR #2350 * Why - In the ProductImportStrategy class, the getImportInstructions improperly checks the product.id for each row. With it setup this way, products will always be considered new because the product.id column is not read here. So products will never be updated. [Link to the code line](https:/medusajs/medusa/blob/bd941309161bcee4fbfc7918d310c426ba8d8f15/packages/medusa/src/strategies/batch-jobs/product/import.ts#L166) * How - Replacing `row["product.product.id"]` to `row["product.id"]` Co-authored-by: Oliver Windall Juhl <[email protected]>
Bug report
Describe the bug
In the
ProductImportStrategy
class, thegetImportInstructions
improperly checks theproduct.id
for each row. Please see the code snippets section for the exact line.With it setup this way, products will always be considered new because the
product.id
column is not read here. So products will never be updated.Expected behavior
I would expect this to be
row['product.id']
instead.Code snippets
medusa/packages/medusa/src/strategies/batch-jobs/product/import.ts
Line 166 in bd94130
The text was updated successfully, but these errors were encountered: