how do I import a CSV of products into a Kickstart site using commerce_feeds, with commerce_autosku enabled to generate the SKUs on import?

This sounds like it should be possible because an obvious use case is the one where you don't care about SKU and you have a CSV with Title, Price and Description of each product. But I keep getting an error similar to:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'commerce_product-52' for key 'PRIMARY'

1 Answer 1


Seeing this issue, seems that is not currently 100% possible: https://www.drupal.org/node/1662620

Answer from the mainainer in that issue:

Have you tried unchecking the "Always regenerate SKU's" checkbox for this product type? That should allow your SKU's to be accepted without being overwritten.

  • Hi Pedro - thanks for the response. I saw that thread (and tried unchecking the box) but my interpretation was that this was to solve the issue of overwriting user-provided SKUs ie the suggestion wasn't addressing whether or not commerce_autosku works with commerce_feeds. I could be wrong though.
    – Justin
    Jun 23, 2014 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.