Mass upload variants

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #239911

-- HikaShop version -- : 2.6.0
-- 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.

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #239955

Hello?

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
7 years 10 months ago #239968

Hi,

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.

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #240141

Tried a few different ways - heres the last one i tried.

Thank you

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
7 years 10 months ago #240151

Hi,

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.

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #240192

Sure I guessed this, I tried this option because when I export the full csv I cannot see a column to add the variants, I tried entering in one column but it did not work... I have created the Characteristic and variants already, also I do not need a product weight...I have attached a full export, perhaps you can show where to add my flavour please?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
7 years 10 months ago #240197

Hi,

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.

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #240254

What is the minimum columns I can use in the CSV export to be able to just paste all the flavours into the CSV? because I cannot seem to upload an XLS file and pasting into the CSV is not easy when I need to add all the other info before the flavour

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.

  • Posts: 13201
  • Thank you received: 2322
7 years 10 months ago #240260

Hi,

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.

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #240331

Ok so I uploaded this csv but it did not work as expected, it added blank variants...any idea why?

Regards
Neil

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
7 years 10 months ago #240363

Hi,

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.

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #240447

I'm totally lost here - I have added the product characteristic (OMG Flavour) I added 3 Values which are, Apple & Raspberry 6MG, Apple & Raspberry 12MG, Apple & Raspberry 24MG in the back end.... now I wanted to do a mass upload of values, which are the rest of the flavours....should I pm you log in details?

UPDATE - PM sent

Last edit: 7 years 10 months ago by ncoates.

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
7 years 10 months ago #240502

Hi,

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.

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #240869

So I can not do a mass upload of values?

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.

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #240872

Also I have tried uploading in myphpadmin but it doesnt work - could you explain how please?

Please Log in or Create an account to join the conversation.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
7 years 10 months ago #240890

Hi,

So I can not do a mass upload of values?

Not in HikaShop, only through PHPMyAdmin.

That means I have to manually type in 178 flavours for each product?

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.
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.

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #240975

I guess that is only if the flavours are the same for each product?

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.

  • Posts: 81379
  • Thank you received: 13037
  • MODERATOR
7 years 10 months ago #240977

Hi,

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.

  • Posts: 56
  • Thank you received: 0
7 years 10 months ago #241074

I need to enter all the possible flavours as values of my characteristic, yes, I know, but there are so many flavours that to type them all would take so long, I wanted to be able to copy them from the CSV I have and paste them somewhere or do a mass upload - this is my exact question, is there a simple way or have I no option but to manually type in 178 values for this?

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
7 years 10 months ago #241079

Hi,

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.

Time to create page: 0.117 seconds
Powered by Kunena Forum