开发者

Magento - batch import error

开发者 https://www.devze.com 2023-02-12 02:02 出处:网络
I am currently creating a batch script that will import products into a particular category. I am however, receiving an error in the output:

I am currently creating a batch script that will import products into a particular category.

I am however, receiving an error in the output:

exception 'PDOExcepti开发者_如何转开发on' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '51-1' for key 'IDX_STOCK_PRODUCT''

This seems to insert the first record in my CSV file, but then fails on the next one.

Has something gone wrong with my database, or is this an issue with my script?

Thanks


It seems as though my database was corrupt. Reverting back to an older SQL dump seemed to have fixed the problem


I had the same problem! It was caused by non unique skus in my csv file! As soon as I skipped the lines with non unique skus it worked like a charm!

Maybe think about adding a number to sku to make it unique or something like that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号