Import products with variants, issue with codes

  • Posts: 9
  • Thank you received: 0
13 years 1 month ago #27509

I'm having a little difficulty in importing a range of products with variants. My main issue is with the column 'product_code', as I need to set this correctly.

I'm about to import 3000+ items, and this is driving me a little insane.

Here's my csv file as it is.

product_code,product_id,product_parent_id,product_name,product_short_desc,product_description,product_quantity,product_dimension_unit,product_width,product_length,product_height,product_access,price_value ,price_currency_id ,categories,parent_category,product_published,images,related,options,Frame Number,Locking Options,Frame Size,Colours
27.12.75.00,27.12.75.00,,MTE 12H ,Holds 12 frames with 75mm spacing. Options of locking or non-locking with fixings and turning key.,Single Rod aluminium. Option of either open or locking with turning key. Holds 12 glasses. Distance between the frame holders 75mm.,-1,mm,1060,170,190,all,67.90,4,Single Rods/Mini Tubix,Mini Tubix,1,4,,,,Non-locking,,
27.12.75.05,27.12.75.05,27.12.75.00,MTE 12H ,Holds 12 frames with 75mm spacing. Options of locking or non-locking with fixings and turning key.,Single Rod aluminium. Option of either open or locking with turning key. Holds 12 glasses. Distance between the frame holders 75mm.,-1,mm,1060,170,190,all,111.80,4,Single Rods/Mini Tubix,Mini Tubix,1,4,,,,locking,,

My issue is this:

The main product will have a product_code of : 27.12.75.00, and the variant is the locking version, with 27.12.75.05. All good so far. But... The main product and first variant are the same product and theoretically the same product code. At the moment, the import adds both items, but only shows the locking version, with the non-locking imported but not available.

I found an example which I've tried to follow:
product_code,product_parent_id,color,size
prod1,,blue,10
prod1_1,prod1,blue,10
prod1_2,prod1,red,10

In my case, prod1 and prod1_1 are the same item, and need the same code. This is already defined in a published catalogue, so cannot accept alternatives.

If I'm doing anything wrong, I'll certainly experiment. I'm also using the latest version of hikashop.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 1 month ago #27517

You can't have one variant of a product with the same product code as one of it's variants.
in the example of the documentation:
- the first line define the main product. The data in that main product will be copied automatically to all its variants if there is no corresponding data in the variants. So, for example, if the description is the same for all the variants, you can just put it there and not in the variants. The "blue" color and "10" size define here which default value should be displayed on the product page of that product.
- the second and third lines are variants of that main product.


So what you should have is this:
main product: 27.12.75.main
variant 1: 7.12.75.00
variant 2: 27.12.75.05

You can't have the same code for the main product and one of the variants. You would have to modify a lot of things in HikaShop for that.

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

  • Posts: 9
  • Thank you received: 0
13 years 1 month ago #27518

Hi,

Yeah, I figured that would be the case. I've been setting up new codes for the main product, as you have to select a variant, which shows up in the order at checkout as the right code.

So if I select locking, I would see:

MTE12H : 27.12.75.05

in the checkout area, which is what I want. Many thanks, and an awesome product thus far. Now for editing the CSV file :S

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

Time to create page: 0.055 seconds
Powered by Kunena Forum