[Skip to main content](#vessel-content)

#   Import products with variants, issue with codes

##

- **[sthomas](/forum/user/3545-sthomas "View sthomas's Profile")**
- [![sthomas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3545-sthomas "View sthomas's Profile") Topic Author
- [ Offline](/forum/user/3545-sthomas)

Less More

- Posts: 9
- Thank you received: 0
-
-

15 years 2 weeks ago [\#27509](#27509) by [sthomas](/forum/user/3545-sthomas "View sthomas's Profile")  *[Import products with variants, issue with codes](/forum/4-how-to/27509-import-products-with-variants-issue-with-codes#27509 "I'm having a little difficulty in importing a range of products with variants. My main issue is with the column 'product&#95;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&#95;code,product&#95;id,product&#95;parent&#95;id,product&#95;name,product&#95;short&#95;desc,product&#95;description,product&#95;quantity,product&#95;dimension&#95;unit,product&#95;width,product&#95;length,product&#95;height,product&#95;access,price&#95;value ,price&#95;currency&#95;id ,categories,parent&#95;category,product&#95;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&#95;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&#95;code,product&#95;parent&#95;id,color,size prod1,,blue,10 prod1&#95;1,prod1,blue,10 prod1&#95;2,prod1,red,10  In my case, prod1 and prod1&#95;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.")* was created by *[sthomas](/forum/user/3545-sthomas "View sthomas's Profile")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI3NTA5LWltcG9ydC1wcm9kdWN0cy13aXRoLXZhcmlhbnRzLWlzc3VlLXdpdGgtY29kZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

15 years 2 weeks ago [\#27517](#27517) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Import products with variants, issue with codes](/forum/4-how-to/27509-import-products-with-variants-issue-with-codes#27517 "I'm having a little difficulty in importing a range of products with variants. My main issue is with the column 'product&#95;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&#95;code,product&#95;id,product&#95;parent&#95;id,product&#95;name,product&#95;short&#95;desc,product&#95;description,product&#95;quantity,product&#95;dimension&#95;unit,product&#95;width,product&#95;length,product&#95;height,product&#95;access,price&#95;value ,price&#95;currency&#95;id ,categories,parent&#95;category,product&#95;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&#95;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&#95;code,product&#95;parent&#95;id,color,size prod1,,blue,10 prod1&#95;1,prod1,blue,10 prod1&#95;2,prod1,red,10  In my case, prod1 and prod1&#95;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.")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI3NTA5LWltcG9ydC1wcm9kdWN0cy13aXRoLXZhcmlhbnRzLWlzc3VlLXdpdGgtY29kZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sthomas](/forum/user/3545-sthomas "View sthomas's Profile")**
- [![sthomas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3545-sthomas "View sthomas's Profile") Topic Author
- [ Offline](/forum/user/3545-sthomas)

Less More

- Posts: 9
- Thank you received: 0
-
-

15 years 2 weeks ago [\#27518](#27518) by [sthomas](/forum/user/3545-sthomas "View sthomas's Profile")  Replied by *[sthomas](/forum/user/3545-sthomas "View sthomas's Profile")* on topic *[Re: Import products with variants, issue with codes](/forum/4-how-to/27509-import-products-with-variants-issue-with-codes#27518 "I'm having a little difficulty in importing a range of products with variants. My main issue is with the column 'product&#95;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&#95;code,product&#95;id,product&#95;parent&#95;id,product&#95;name,product&#95;short&#95;desc,product&#95;description,product&#95;quantity,product&#95;dimension&#95;unit,product&#95;width,product&#95;length,product&#95;height,product&#95;access,price&#95;value ,price&#95;currency&#95;id ,categories,parent&#95;category,product&#95;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&#95;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&#95;code,product&#95;parent&#95;id,color,size prod1,,blue,10 prod1&#95;1,prod1,blue,10 prod1&#95;2,prod1,red,10  In my case, prod1 and prod1&#95;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.")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI3NTA5LWltcG9ydC1wcm9kdWN0cy13aXRoLXZhcmlhbnRzLWlzc3VlLXdpdGgtY29kZXM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.058 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
