CSV Categories & Subcategories Imoport
-
I’m looking to update my product catalog via CSV. I’ve found all the docs but I’m confused about multiple categories and multiple subcategories.
My structure might look something like this:
Product 1
> Parent
>>Sub 1
>>Sub 2
>Parent
>>Sub 1
>>Sub 2
>Parent
>>Sub 1Essentially, each product can have multiple categories and multiple subcategories. How is this markeddown in the CSV for the basic importer that woocommerce has?
-
How is this markeddown in the CSV for the basic importer that woocommerce has?
In the CSV, under the Categories column, on the desired product field, if you want to add categories to a product, add the category name like you want it to appear on your site, like this
Category. To add another one to the product, add a comma (,) and then add the category, like thisCategory 1, Category 2.To add subcategories, add the category name and then the subcategory, like this
Category > Subcategory. If you want to add another subcategory, it will be as described aboveCategory 1 > Subcategory 1, Category 1 > Subcategory 2, and so on.So, your product category structure will look something like this for Product 1:
Parent, Parent > Sub 1, Parent > Sub 2, and so on.You can check a real-life example here.
To use the built-in product CSV Importer, you can copy the file structure found here. If possible, avoid using Microsoft Excel due to formatting and character encoding issues.
I hope this helps! Let us know if you have any questions.
Okay, that worked to upload with the appropriate hierarchies; but, it didn’t apply the categories to the product. Is there something I’m missing?
I used the template here and modified accordingly: https://github.com/woocommerce/woocommerce/blob/master/sample-data/sample_products.csv
That’s strange. A couple of questions come to my mind:
Did you add just the name of the category followed by a comma? (E.g.
Music, Books, Category)Are you using one of the CSV editors recommended at https://woocommerce.com/document/product-csv-importer-exporter/#what-csv-editors-do-you-recommend?
Kindly share a screenshot of the category column of the CSV you are uploading to further check into this. You can use the snipboard.io tool to share it.
Thanks!
Sure, see below. Additionally, the images are associated properly.
Thank you for sending the screenshot; it is helpful.
In it, I can see that you set the subcategories correctly. But I also can see that you are missing the categories for both products. To add them, type each category followed by a comma, like this
Accord, Gender, Season.Here you can see how it should look once you add the categories: https://snipboard.io/tcUy6D.jpg.
Let us know how it goes!
Ah, that makes sense! It worked.
One last question. How do I denote in the CSV that an attribute is not to be used for variations?
I’m glad that it worked for you.
How do I denote in the CSV that an attribute is not to be used for variations?
Attributes are required for variable products if that is what you are referring to.
Could you please elaborate a bit more on what you are trying to achieve? You can set an example if required for a better understanding.
Thanks!
sure, so here is my CSV with some attributes. I only want the ‘Size’ attribute to be used for variations when uploaded.
But when uploaded, in the product page, all of the attributes are selected to use for variations. I only want to use Size (Bottle, Sample) for variations. The rest can/should show in the additional information on the product page.
If you only want the
Sizeattribute to be used for variations, then please de-select the checkboxes that say “Used for variations” for the Brand, Accord and Season, and save. These should no longer be used for variations then.I understand that, but I would have to go through 200+ products and do that. Is there a way to prevent that option from being selected by default when uploading via CSV? It seems to have only turned on when changing from simple to variable products.
But when uploaded, in the product page, all of the attributes are selected to use for variations. I only want to use Size (Bottle, Sample) for variations. The rest can/should show in the additional information on the product page.
Try adding “0” to
Attribute 2 globalandAttribute 3 global. That should untick “Used for variations”
Link to image: https://snipboard.io/MEzig7.jpgThanks! I tried that, it didn’t work. It still ticks them all for variations.
Just wanted to update. If I turn off ‘Attribute # global’ it doesn’t associate the product with an attribute at all.
Is there a way to prevent that option from being selected by default when uploading via CSV?
I’ve done some testing and it seems the only option would be removing the attribute in the CSV import. There are some plugins though that should help you bulk edit the products:
I’m not aware of any code snippet that might help in this case, but someone else might be able to chime in here.
Cheers.
The topic ‘CSV Categories & Subcategories Imoport’ is closed to new replies.