- Posts: 56
- Thank you received: 0
Mass upload variants
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.4.40
Hi Please can you tell me the best way to mass upload variants?
I have tried exporting various different selections of CSV and XLS and editing that file and then uploading but this does not add any variants, am I doing something wrong?
I have 1 product that has 1 Characteristic (Flavour) but there are around 50 flavours, this is my goal, to upload mass flavours to 1 product....
Thank you
Neil
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Export/import of a CSV is the way to go yes.
If it didn't add the variants, it means that you're missing something in your CSV.
Could you provide a copy of the CSV you're trying to import ?
Please Log in or Create an account to join the conversation.
Thank you
Please Log in or Create an account to join the conversation.
Your CSV is no good at all.
There are no columns. Everything is in one column: take.ms/KkbO1
There should be many columns: for the product_code, for the characteristic name, for the product_parent_id, etc.
If you do an export of a CSV from HikaShop you should see the many columns available, and our export documentation has information on the main columns you can use and how to use them:
www.hikashop.com/support/documentation/73-hikashop-import.html
Based on what I can see in your csv, you would need to first create two characteristics, one for the flavour, one for the weight, with all the possible values in each one. And then, you would have at least these columns in your CSV:
product_code : the code of the product or the variant
product_parent_id: nothing for main products and the product_code of the main product for variants
flavour: the default flavour for the main product and the flavour value for the variant
weight: the default weight for the main product and the weight value for the variant
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
There you have the columns you need:
product_code, product_parent_id, OMG Flavour
Then, you can add extra columns as you need them (price_value, categories, product_quantity, etc).
Please Log in or Create an account to join the conversation.
I.E. all;"";0;"";"10ml_Oh_My_God_UK_Made_E_liquid_1";0;"2016-05-10";0;"";"m";0;"";"0.000 m";0;2;"";"";"";"0.000 m";0;0;"";0;"2016-05-10";0;"";"";"10ml_Oh_My_God_UK_Made_E_liquid";0;1;-1;"";"";"";0;0;0;"variant";"";0;0;0;0;"kg";"0.000 m";"";"";"";"";"";"";"";"";"Apple & Raspberry 6MG";""
Please Log in or Create an account to join the conversation.
The minimum columns number in your case is 3 columns, one for the product code, another for the product_parent_id to link the product to the parent and the last one the column to set the desired value.
The ones given by Nicolas, then you can add extra columns based on the needed data.
Please Log in or Create an account to join the conversation.
Regards
Neil
Please Log in or Create an account to join the conversation.
The product_id column should be removed.
As for the blank variants, this means that the value doesn't exist in the characteristic.
Before using a value of a characteristic for the import of products, that value must be added in the characteristic.
You can then use it for all products imports you want.
Please Log in or Create an account to join the conversation.
UPDATE - PM sent
Please Log in or Create an account to join the conversation.
Well what you want to do and what you said you wanted to do are differents.
You seem to be mistaking variants and values for the same thing.
Supposing you're selling 1000 products.
Suppose that each product has a characteristic "flavour".
That characteristic has 100 values.
So each product can have up to 100 variants.
For example, in one product, you'll aattach only 10 values of that characteristic so that product will have 10 variants.
The import system allows you to import products and variants of products.
But it doesn't allow you to import characteristics or values.
So as I said in my previous email, before import products and variants using the values of a characteristic, you first need to add all the values of the characteristic in the interface.
There is no import system for the characteristics. You can export/import a CSV of the hikashop_characteristic table in your phpmyadmin if you want to do a mass upload of the values of a characteristic, but you can use the HikaShop products import for that.
Please Log in or Create an account to join the conversation.
That means I have to manually type in 178 flavours for each product?
Or use myphpadmin?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Not in HikaShop, only through PHPMyAdmin.So I can not do a mass upload of values?
No. You need to type in the 178 flavours values once in the values listing of the flavour characteristic. Once that's done, you can use the CSV that you were using to generate the variants of all the products based on the values of that characteristic.That means I have to manually type in 178 flavours for each product?
You don't need PHPMyAdmin for that.
And for 178 values, you can add them through the characteristic edition interface of your backend. It should only take a few minutes.
Please Log in or Create an account to join the conversation.
Here I am assuming that :
value = flavour type i.e. apple, banana
characteristic = flavour
?
Thanks for all your help so far, but I think I am still struggling to understand how I can simplify this for myself to add 178 flavours to a product without typing each one manually
Please Log in or Create an account to join the conversation.
No.
You need to enter all the possible flavours as values of your flavour characteristic.
Once that's done, you can import your products with the variants you want for each product.
Each product doesn't have to have a variant for each value of the characteristic.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You can potentially create a MySQL request from that csv file with some PHP code.
This MySQL will have to insert values in the table "#__hikashop_characteristic", the only columns to fill are "characteristic_value" which is the name of the variant and "characteristic_parent_id" must be the id of the characteristic.
Please Log in or Create an account to join the conversation.