[Skip to main content](#vessel-content)

#   Tutorial on CSV import with Variants

##

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 10 months ago [\#37749](#37749) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  *[Tutorial on CSV import with Variants](/forum/4-how-to/37749-tutorial-on-csv-import-with-variants#37749 "Ok, i sorted it this way:  0) I've chosen to make the csv imports category by category, I mean, in my case I have created first the category tree with a csv import that look like this:  parent&#95;category,categories ;category-1 category-1;subcategory-1 category-1;subcategory-2 category-1;subcategory-3 ;category-2 category-2;subcategory-a category-2;subcategory-b category-2;subcategory-c  it looks like this in my spreadsheet  This will create &quot;category-1&quot; and &quot;category-2&quot; each one with tree subcategories in it.  Next I manualy create a caracteristic containing all the possible variants each product on the subcategory-1 could have from the caracteristand menu in the hikashop admin pannel, lets say:  main caracteristic:  caracteristic-x  and caracteristic-x have variants:  cyan magenta yellow black red green blue  I know (in my case and the way i'm organizing my products) that in subcategory-1 there will be only products that could have variants based on caracteristic-x so now that I've prepared the caracteristic I can call it in my csv with its own column, then i create a csv very similar to this one:  product&#95;parent&#95;id;product&#95;name;product&#95;description;product&#95;quantity;product&#95;code;product&#95;type;categories;price&#95;value;price&#95;currency&#95;id;images;category-x 0;FirstProduct;The best product on the planet!;-1;sku-123;main;subcategory-1;15.5;EUR;imagecyan.jpg;cyan sku-123; ; ;-1;sku-123-cyan;variant; ;15,5;EUR;imagecyan.jpg;cyan sku-123; ; ;-1;sku-123-mage;variant; ;16,5;EUR;imagemagenta.jpg;magenta sku-123; ; ;-1;sku-123-yell;variant; ;17,5;EUR;imageyellow.jpg;yellow 0;SecondProduct;The best Second product on earth!;-1;sku-456;main;subcategory-1;17,8;EUR;imagered.jpg;red sku-456; ; ;-1;sku-456-red;variant; ;17,8;EUR;imagered.jpg;red sku-456; ; ;-1;sku-456-green;variant; ;17,8;EUR;imagegreen.jpg;green sku-456; ; ;-1;sku-456-blue;variant; ;17,8;EUR;imageblue.jpg;blue  in my spreadsheet looks something like the file attached.  This creates me automaticaly two products inside subcategory-1 with respective variants:  -FirstProduct with cyan, magenta, and yellow caracteristic for chosing from the dropdown menu having each variant its own price, product code and product image -SecondProduct with red, green and blue caracteristic each one with their image, price and product code.  This way i find very streamlined the process of inserting my products in bunches and considering i'm making a printed catalog tthat must reflect the website structure each category in the website corrisponds to a section in my printed catalog and this way is more easy to automate the layout in indesign using the datamerge tool. (take a look at this )  :unsure: The only think i need to understand is how to make a product searching based on the product code i've created for each variant, giving that each variant is a product per-se I hope someone with good heart points me in the right direction. :unsure:")* was created by *[protorob](/forum/user/5729-protorob "View protorob's Profile")*

Ok, i sorted it this way:

0) I've chosen to make the csv imports category by category, I mean, in my case I have created first the category tree with a csv import that look like this:

parent_category,categories
;category-1
category-1;subcategory-1
category-1;subcategory-2
category-1;subcategory-3
;category-2
category-2;subcategory-a
category-2;subcategory-b
category-2;subcategory-c

it looks like this in my spreadsheet

[ ![Schermata2012-02-01a08.34.28.png](/forum/attachment/2585) ](/forum/attachment/2585 "...1a08.34.28.png")

This will create "category-1" and "category-2" each one with tree subcategories in it.

Next I manualy create a caracteristic containing all the possible variants each product on the subcategory-1 could have from the caracteristand menu in the hikashop admin pannel, lets say:

main caracteristic:

**caracteristic-x**

and caracteristic-x have variants:
**cyan
magenta
yellow
black
red
green
blue**

I know (in my case and the way i'm organizing my products) that in subcategory-1 there will be only products that could have variants based on caracteristic-x so now that I've prepared the caracteristic I can call it in my csv with its own column, then i create a csv very similar to this one:

product_parent_id;product_name;product_description;**product\_quantity**;product_code;**product\_type**;categories;price_value;price_currency_id;images;category-x
0;FirstProduct;The best product on the planet!;-1;sku-123;**main**;subcategory-1;15.5;EUR;imagecyan.jpg;cyan
sku-123; ; ;-1;sku-123-cyan;**variant**; ;15,5;EUR;imagecyan.jpg;cyan
sku-123; ; ;-1;sku-123-mage;**variant**; ;16,5;EUR;imagemagenta.jpg;magenta
sku-123; ; ;-1;sku-123-yell;**variant**; ;17,5;EUR;imageyellow.jpg;yellow
0;SecondProduct;The best Second product on earth!;-1;sku-456;**main**;subcategory-1;17,8;EUR;imagered.jpg;red
sku-456; ; ;-1;sku-456-red;**variant**; ;17,8;EUR;imagered.jpg;red
sku-456; ; ;-1;sku-456-green;**variant**; ;17,8;EUR;imagegreen.jpg;green
sku-456; ; ;-1;sku-456-blue;**variant**; ;17,8;EUR;imageblue.jpg;blue

in my spreadsheet looks something like the file attached.

This creates me automaticaly two products inside subcategory-1 with respective variants:

-FirstProduct with cyan, magenta, and yellow caracteristic for chosing from the dropdown menu having each variant its own price, product code and product image
-SecondProduct with red, green and blue caracteristic each one with their image, price and product code.

This way i find very streamlined the process of inserting my products in bunches and considering i'm making a printed catalog tthat must reflect the website structure each category in the website corrisponds to a section in my printed catalog and this way is more easy to automate the layout in indesign using the datamerge tool. (take a look at this [ tutorial](http://tv.adobe.com/watch/instant-indesign/automating-a-catalog-with-data-merge/))

![:unsure:](/media/kunena/emoticons/18.png ":unsure:") The only think i need to understand is how to make a product searching based on the product code i've created for each variant, giving that each variant is a product *per-se*
I hope someone with good heart points me in the right direction. ![:unsure:](/media/kunena/emoticons/18.png ":unsure:")

- [ ![Schermata2012-02-01a08.34.28.png](/forum/attachment/2585) ](/forum/attachment/2585 "...1a08.34.28.png") [ ](/forum/attachment/2585?download=1 "...1a08.34.28.png")
- [ ![Schermata2012-02-01a08.58.54.png](/forum/attachment/2586) ](/forum/attachment/2586 "...1a08.58.54.png") [ ](/forum/attachment/2586?download=1 "...1a08.58.54.png")

The following user(s) said Thank You: [chasaj](/forum/user/33654-chasaj "View chasaj's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3NzQ5LXR1dG9yaWFsLW9uLWNzdi1pbXBvcnQtd2l0aC12YXJpYW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

14 years 10 months ago [\#37901](#37901) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Tutorial on CSV import with Variants](/forum/4-how-to/37749-tutorial-on-csv-import-with-variants#37901 "Ok, i sorted it this way:  0) I've chosen to make the csv imports category by category, I mean, in my case I have created first the category tree with a csv import that look like this:  parent&#95;category,categories ;category-1 category-1;subcategory-1 category-1;subcategory-2 category-1;subcategory-3 ;category-2 category-2;subcategory-a category-2;subcategory-b category-2;subcategory-c  it looks like this in my spreadsheet  This will create &quot;category-1&quot; and &quot;category-2&quot; each one with tree subcategories in it.  Next I manualy create a caracteristic containing all the possible variants each product on the subcategory-1 could have from the caracteristand menu in the hikashop admin pannel, lets say:  main caracteristic:  caracteristic-x  and caracteristic-x have variants:  cyan magenta yellow black red green blue  I know (in my case and the way i'm organizing my products) that in subcategory-1 there will be only products that could have variants based on caracteristic-x so now that I've prepared the caracteristic I can call it in my csv with its own column, then i create a csv very similar to this one:  product&#95;parent&#95;id;product&#95;name;product&#95;description;product&#95;quantity;product&#95;code;product&#95;type;categories;price&#95;value;price&#95;currency&#95;id;images;category-x 0;FirstProduct;The best product on the planet!;-1;sku-123;main;subcategory-1;15.5;EUR;imagecyan.jpg;cyan sku-123; ; ;-1;sku-123-cyan;variant; ;15,5;EUR;imagecyan.jpg;cyan sku-123; ; ;-1;sku-123-mage;variant; ;16,5;EUR;imagemagenta.jpg;magenta sku-123; ; ;-1;sku-123-yell;variant; ;17,5;EUR;imageyellow.jpg;yellow 0;SecondProduct;The best Second product on earth!;-1;sku-456;main;subcategory-1;17,8;EUR;imagered.jpg;red sku-456; ; ;-1;sku-456-red;variant; ;17,8;EUR;imagered.jpg;red sku-456; ; ;-1;sku-456-green;variant; ;17,8;EUR;imagegreen.jpg;green sku-456; ; ;-1;sku-456-blue;variant; ;17,8;EUR;imageblue.jpg;blue  in my spreadsheet looks something like the file attached.  This creates me automaticaly two products inside subcategory-1 with respective variants:  -FirstProduct with cyan, magenta, and yellow caracteristic for chosing from the dropdown menu having each variant its own price, product code and product image -SecondProduct with red, green and blue caracteristic each one with their image, price and product code.  This way i find very streamlined the process of inserting my products in bunches and considering i'm making a printed catalog tthat must reflect the website structure each category in the website corrisponds to a section in my printed catalog and this way is more easy to automate the layout in indesign using the datamerge tool. (take a look at this )  :unsure: The only think i need to understand is how to make a product searching based on the product code i've created for each variant, giving that each variant is a product per-se I hope someone with good heart points me in the right direction. :unsure:")*

That's a really nice tutorial !

Having the search plugin works for variant information is not easy if you want to make something compatible with all the possibilities. It's not just two your three lines that can easily be changed in the plugin. I don't see an easy way of doing it properly.

The following user(s) said Thank You: [protorob](/forum/user/5729-protorob "View protorob's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzM3NzQ5LXR1dG9yaWFsLW9uLWNzdi1pbXBvcnQtd2l0aC12YXJpYW50cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.050 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
