I have been strugling with the hika csv's a lot in the past 2 months and i've learned:
- If you want to automate the characteristics creation it can't be done trought csv import as you do for categories tree. The best way to do it (an the fastest) is to manually edit the table *****_hikashop_characteristics via phpMyAdmin. (it sounds more dificult than it actually is), more on this after the list!
- Is extremely helpfull to have a very organized set of spreadsheets (excell files) that reflects the overall structure of your store, and have those spreadsheets well organized as well. Think about creating a folder structure (on your computer) that reflects the structure of your categories and subcategories then put inside those folder the csv's related to those products. (this might be a little bit more complex to do if you have lots of products attached to many categories at once) this way is more easy/safe make modifications to only certain areas of your shop, i allways prefer to avoid mass modifications via csv import, not because it can't be done but imagine how dificult could be to find an error on a product import containing more than 10000 products!
- Use the export feature on your product listing and have a look on how Hikashop expects you to create your own csv. Remember that you don't need to include all those rows in your csv, feel free to remove the ones you're not going to use at the begining and progresively add the remaining rows when you feel you need them, hikashop is pretty inteligent on recognizing and sorting your csv data.
---Before beginin with this part i suggest you to create a couple of characteristics with variants so you have some data on de database tables to analize on the next steps.----
For creating a lot of characteristics with little to no pain you need to go to your phpMyAdmin area of your webhost and search for this tabble:
Then export it to csv using the export tool you find here:
You have to indicate the csv type of file of the options you find when you click on the export command.
If everything is ok try opening that file with excell or openoffice(i use open office) and indicate that you're using the comma as separator. Now you will have a document having your characteristics on three colums, may be you don't see the row names and that's because in the csv export (in phpMyAdmin) you have to especify that you want them, there's a checkbox near the end of the export options that ask you for "include name of the colums on the first row" or something similar (my system is italian) select that option and you will have your row names.
Your csv should be something like this immage (i've added color just for visual reference)
Where the first row "characteristic_id" is related to the ID of the characteristic in general, and this number should be unique for each item on each row no matter if that row reffers to a characteristic or a variant. I think is a number used by the system and i have no intentions to go deeper on that subject.
The second row "characteristic_parent_id" is to tell Hikashop if that row is relative to a caracteristic or to a variant of some characteristic, in fact you could see that the row containing the word "Color:" have a parent id value of 0 this says to hikashop that it is a characteristic while the rows containing "red, green and blue" has a characteristic_parent_id equal to the "characteristic_id" of "Color:" this tells hikashop that red, green and blue are variants inside color.
That's it, folowing this logic you can create as many characteristics/variants as you want almost automatically!
When you finish with your file you have to import that data again into the *****_hikashop_characteristics table on your database using the import function in phpMyAdmin watching that you're actually importing de data into the right table, you can se if you're importing into the right place looking here:
Attacched there is an immage with the configuration of the csv import that works for me.
I choose to skip the first line on the import because i know that those are the row names and i dont think is cool to have them twice in the table.
Then i choose to replace the hole data with the one i'm importing because i began with the exported file containing all the information already in the table, use it with discretion.
If everything goes as expected now you can go to your hikashop characteristics control pannel and you will find your brand new characteristics with variants as created in your excell file.
I hope this information was usefull and please share your results.