question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improperly referenced product id when parsing CSV for bulk product update via import strategy

See original GitHub issue

Bug report

Describe the bug

In the ProductImportStrategy class, the getImportInstructions improperly checks the product.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

https://github.com/medusajs/medusa/blob/bd941309161bcee4fbfc7918d310c426ba8d8f15/packages/medusa/src/strategies/batch-jobs/product/import.ts#L166

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
olivermrblcommented, Oct 6, 2022

Nice catch @a-finocchiaro and appreciate the contribution @ayushthe1 💪

0reactions
olivermrblcommented, Oct 7, 2022

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! 💪

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 Advanced CSV Import Features You (Probably) Won't ...
10 Advanced CSV Import Features You (Probably) Won't Launch Yourself · 1. Data Validation & Autofixes · 2. Advanced Parsing · 3. Exportable...
Read more >
Solutions to common product CSV import problems
Troubleshooting product CSV files. Identify missing fields or headers, illegal formatting or identifier duplications before contacting support.
Read more >
6 Common CSV Import Errors and How to Fix Them - Flatfile
The import error can be caused by limits set by the program using the file or the amount of available memory on the...
Read more >
The Ultimate Guide to Shopify Import - Firebear Studio
Shopify enables you to apply changes to your catalog items via CSV. Export your products, edit the CSV file and reimport it back...
Read more >
NetSuite Applications Suite - CSV Import FAQ
Working with Products and Modules ... Items Available only to Certified Customers · Different Product Lines Available to Different Customers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found