Magento - batch import error
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.
精彩评论