Tags/topics: 
5
Answers
Vote up!
1
Vote down!

Can Feeds import products with Auto SKU creation?

I have a lot of products to import with the Feeds module but I don't already have SKUs for them. It would be great if Auto SKU could do its job during the import process. I set it up to do that, turning on Auto SKU for a variation type, using a simple integer for GUID (1,2,3,4....) but I get the error "Required product SKU is missing." Maybe the only way is to use Feeds Tamper?

Asked by: obuck
on January 18, 2013

5 Answers

Vote up!
1
Vote down!

I'd like to know this as well, I'm getting similar results.

Answer by: pmackay
Posted: Mar 20, 2013
Vote up!
0
Vote down!

Is it possible to get feeds tamper to set the SKU based on the title field for example?

Answer by: SharonD214
Posted: Apr 11, 2013
Vote up!
0
Vote down!

I have the same issue with autosku and I need auto sku with feed.
Is it possible as I get

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

Thanks.

Answer by: tarasiadis
Posted: Sep 8, 2014
Vote up!
0
Vote down!

there is an issue with commerce feeds with this. I didn't have time to patch but for others...here is a suggested workaround.

disable autosku for the product type or types you are importing
run your import
re-enable the autosku for the products

Programatically (I was running imports via an update hook) this is a method for disabling autosku for a given product type:

db_update('commerce_autosku_patterns')->fields(array(
    'pattern' => '',
    'advanced' => ''
    ))->condition('product_type', 'machine_name_of_your_product_type'')->execute();

To re-enable run the following (adapting the names to suit)

db_update('commerce_autosku_patterns')->fields(array(
    'pattern' => '[your existing autosku pattern]',
    'advanced' => 'a:3:{s:15:"update_existing";i:1;s:8:"hide_sku";i:1;s:4:"case";s:8:"original";}'
    ))->condition('product_type', 'machine_name_of_your_product_type'')->execute();

hope that helps others...

gus

Answer by: Dublin Drupaller
Posted: Jan 20, 2017