[SOLVED] CSV import - problems with variants

  • Posts: 18
  • Thank you received: 0
12 years 5 months ago #82932

Hello,

Can anyone help me with this, I don't know what I'm doing wrong. I already read all post related to CSV on this forum but I don't get it.

First I exported csv file from hikashop and start adding products and variants. I use LibreOffice Calc for that. When I made an import it kind of scrambled some variants and prices were not defined. At import is always the message that I have invalid product codes.

After several tries I decided to clean hikashop database and start over again. So I deleted all the products and variants from hikashop backend. In phpmyadmin I deleted the all the rows and Empty the tables (TRUNCATE) of: hikashop_variant, hikashop_product_category, hikashop_product and hikashop_price.

After this I import a new created csv file (please see atached file), with some products and all its variants with prices. I get this notification: "192 products found, 136 products imported, 14 invalid product codes and 42 already existing products.

Why do I have invalid product codes and already existing products? Did I not deleted them all? What do I have to delete more?

Next I export a new csv file (see attachement) and realized it only imports all main products and only the variants of the last main product in the list. Also some cells of the variants have duplicate values:



If you need more info just ask. I'm trying this for 2 days now. Any help is very appreciated.

regards,
Mainzer

UPDATE: The "14 invalid product codes" is solved, I found the error. All the other problems remain.

Attachments:
Last edit: 12 years 5 months ago by Mainzer.

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

  • Posts: 18
  • Thank you received: 0
12 years 5 months ago #82995

Sorry bordering you.

At last I figured it out. :cheer:

I gave every variant an exclusive product_name and it worked. (I thought that the name of the variants were irrelevant and that hikashop would automaticly create different prodruct_code for each variant)

But this is very time consuming. I have to import tousands of products, with 12 variants each :ohmy:
Does leaving it blank work?

Is there a faster way to do this?

Thank you,
Mainzer

Attachments:

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

  • Posts: 83989
  • Thank you received: 13604
  • MODERATOR
12 years 5 months ago #82996

Hi,

Try to remove the product_id column and import again after a fresh truncate of the table. The rest looks ok in your CSV.

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

  • Posts: 18
  • Thank you received: 0
12 years 5 months ago #83004

Hi nicolas,

Like I said in my 2nd post it only worked renaming each variant with an exclusive product name. I didn't need to eliminate the column product_id, only its content.

Isn't there a "automatic" way to do this?

Thanks

Last edit: 12 years 5 months ago by Mainzer.

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

  • Posts: 83989
  • Thank you received: 13604
  • MODERATOR
12 years 5 months ago #83019

Hi,

You need to fill the product_code column for the variants, otherwise, the system will use the product_name as a product_code and if you have several variants with the same product_name, you get the behavior that you have. The product_name can be the same, that's not an issue, but the product_code has to be unique.
If you don't care about the value of the product_code for variants then that's easy to fill up in excel. just enter a number in the first one and have excel generate all the other ones.

The following user(s) said Thank You: Mainzer

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

  • Posts: 18
  • Thank you received: 0
12 years 5 months ago #83034

Thank you nicolas,

that was exactly what I needed to know :cheer:

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

Time to create page: 0.068 seconds
Powered by Kunena Forum