Support » Plugin: WooCommerce » Importing Product Variations to WooCommerce for free

  • Resolved theumaverse

    (@theumaverse)


    I am trying to import variations to my shop but it’s not working. Any help appreciated. I have created a bunch of products that have the attributes and variations I want to have. I exported those and used them as the template for the .csv file to import. I was able to create the parent products, but it won’t accept the child variations or create them.

    I think that one of two things are going on:
    1. you have to have a paid plugin to make it work (yuk, wrong!)
    or
    2. I’m missing one or two vital pieces of information in my .csv. Sure hoping it’s this one.

    So, my .csv file has all the fields populated EXCEPT product id. But that seems to be automatically assigned by woocommerce so I can’t see how that can help.

    Any thoughts?

    It seemed like the “Parent” field was important, that one for my existing product variations always had the parent id formated “id:3639” so I included that in all my new variations and used the id of the correct parent.

    I’m frustrated. If I have to do this by hand, so be it, it’s not like I have gazillions of products. But it’s frustrating. Any help really appreciated.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support Remi Corson

    (@corsonr)

    Automattic Happiness Engineer

    Hi there,

    To import product variations you actually the following addon:

    https://woocommerce.com/products/product-csv-import-suite/

    since the builtin import system won’t deal with variations.

    seank123

    (@seank123)

    The built in CSV import works fine – I use it all the time!

    You need to ensure that the Parent field is there – you can use the SKU instead of the ID.

    You also need the Type field – variable or variation

    Something like this:

    SKU,Parent,Type,Name,Visibility in catalogue,Regular price,Attribute 1 name,Attribute 1 value(s),Attribute 1 visible,Attribute 1 global
    test001,,variable,Product,visible,,Size,”S,M,L,XL,2XL”,0,1
    ,test001,variation,Product,visible,999,Size,XL,,1
    ,test001,variation,Product,visible,999,Size,L,,1
    ,test001,variation,Product,visible,999,Size,M,,1
    ,test001,variation,Product,visible,999,Size,S,,1
    ,test001,variation,Product,visible,999,Size,2XL,,1

    theumaverse

    (@theumaverse)

    @seank123 i don’t have a SKU for my products. Is this required to make this work?
    My import that didn’t work looked like your example except no SKU. I already imported the parent products.

    theumaverse

    (@theumaverse)

    @corsonr what do you think about what @seank123 is saying?

    seank123

    (@seank123)

    I think you can use either ID or SKU

    Can you paste an example from your import CSV here so I can look at it?

    There is a sample file here: https://github.com/woocommerce/woocommerce/tree/master/sample-data

    The WooCommerce docs about import/export are here: https://docs.woocommerce.com/document/product-csv-importer-exporter/

    theumaverse

    (@theumaverse)

    theumaverse

    (@theumaverse)

    @seank123 I didn’t tag you in the prior message with a link to my spreadsheet. Not sure if I need to, so thought I’d do it just in case.
    https://www.dropbox.com/s/1kwhgmaeib3u9d9/variations-import.csv?dl=0

    seank123

    (@seank123)

    @theumaverse – yes I can see it.

    Have just imported it into my test site and it appears to work fine:

    https://relaxedandrefreshed.co.uk/shop/photographic-art/carolina-cows/

    I did see in the spreadsheet that only Carolina Cows and Tranquillity are set to Published – that is, the main variable product, not the variations

    theumaverse

    (@theumaverse)

    @seank123 Ok, so, Carolina Cows and Tranquility are already live on my site and each variation has a unique ID already. The other ones should not be published on purpose because I wanted to check them before I made them visible, in case things got messed up on import.

    On your site that you imported into, did any of the new variations show up? The ones that do not have ID numbers? For instance, “Above the Fog”

    theumaverse

    (@theumaverse)

    @seank123 Because I’m wondering if the ID number is the crux of the issue. I know that I tried to assign product ID to the parents when I imported them, but woocommerce overwrote those IDs and assigned its own. But the ID is assigned in numerical order so I ought to be able to just see the last ID number and start from there. Maybe I’m off on a tangent here. Also, maybe instead of or in addition to ID number, adding a sku would help. I suppose this will be trial and error.

    seank123

    (@seank123)

    Above The Fog, Awakening and Arising all have the variations as they are set out in the spreadsheet – https://relaxedandrefreshed.co.uk/shop/photographic-art/awakening/

    The rest are there as Variable products with the Attributes set but no variations

    They way it works is that it will add any new items (without IDs or SKUs) and ignore anything else.

    There is a checkbox under where you choose the file ‘Update existing products’ – this will change any product with existing IDs or SKUs but ignore any that are new.

    theumaverse

    (@theumaverse)

    @seank123 Hmm. Interesting. it worked for you. Should that box be unchecked?

    seank123

    (@seank123)

    If it’s the first time you import these products then yes, leave it unchecked. If they’re new products I never use the ID column – just the SKU (that could be anything 001, 002, 003, PIC01, PIC02 etc as long as each is unique)

    But once they’re in you can use it to update prices, add extra variations etc – in that case have it checked.

    Just a thought – have you deleted any products with these IDs? If so and they’re still in the trash then the importer will still see them!

    theumaverse

    (@theumaverse)

    @seank123 Ok i think it’s working now. Very odd. I just tested one product and it imported. But, I think this issue I’m having also has to do with a field in the attributes tab called “used for variations” and it needs to get checked. But that field does not export when I export existing products and I don’t know what it’s called so I can’t toggle it on the import.

    Not sure how to insert an image into this chat so I can’t do that but if you look at the attributes tab and click open any of the attributes you can see it. There are two checkboxes, one is “used for variations” and one is “visible on the product page” – the latter exports as a field when you export data but as far as I can see, the variations one does not. Perhaps this is how woocommerce is trying to force people to have to buy the plug-in.

    interesting:
    https://www.skyverge.com/blog/changing-woocommerce-attribute-visibility-defaults/

    Anyway, I’m out of time to deal with this just now, and have to run on to the next thing, but I’ll circle back around later and let you know how it goes. I’m so happy you are helping me. It just made no sense to me to have to pay extra to do this simple thing.

    thanks!!

    seank123

    (@seank123)

    According to this – https://github.com/woocommerce/woocommerce/wiki/Product-CSV-Import-Schema#csv-columns-and-formatting – the Used For Variations box is set automatically – looks like that only gets done if there are variations in the upload CSV. I just tried with your spreadsheet:

    I added some variations to Clarity – all I did was copy/past from one of the others and changed the Parent ID to ID:3643

    Imported with the Update products checkbox unticked.

    Resulred in the Clarity product now having the correct variations and the ‘Used In Variations’ box ticked.

    So it looks like you should just be able to edit your spreadsheet with all the new variations and import it.

Viewing 15 replies - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.