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

#   CSV Import of variants not as expected

##

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

Less More

- Posts: 45
- Thank you received: 0
-
-

12 years 7 months ago -  12 years 7 months ago [\#149590](#149590) by [paulvanharen](/forum/user/20480-paulvanharen "View paulvanharen's Profile")  *[CSV Import of variants not as expected](/forum/37-import-export-csv-xls/866916-csv-import-of-variants-not-as-expected#149590 "Hello there,  I'm trying to upload my shop inventory from CSV files. I would like to have a number of products, describing their specifications, and then add packaging variants with price information. E.g. as a product I may have chocolate, and as variant I may sell chocolate bars and chocolote boxes.  I've run several trials to get this working, but only with a D-tour it leads to success. In order to understand what's going on, I created some test cases to show things.  Test case 1:  The products to import  And this is what happens: ACTION: Import OK -&gt; INSPECT: phpMyAdmin shows four products in the table #&#95;&#95;hikashop&#95;product INSPECT: Variants recognized in the back-end, with correct pricing INSPECT: All variants appear, prices are not updated when selecting a variant, no suffix is displayed for the variant in the product name.  ACTION: Product -&gt; Manage variants -&gt; INSPECT: Variants are removed from the front-end; product is free INSPECT: phpMyAdmin shows only one product in the table #&#95;&#95;hikashop&#95;product; all variants are gone INSPECT: in the back-end, all variants are gone as well.  Test case 2:  The file to import the main product:  And the file to import all variants somewhat later:  And this is what happens: ACTION: Import main product, ACTION: Product -&gt; Add characteristics INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: Three additional variants with name are now found in phpMyAdmin, making in total 6 variants INSPECT: The newly imported variants are orphans INSPECT: The newly imported variants don show in the back-end INSPECT: No price information is available in the front-end  Test case 3 The file to import the main product  The file to import the variants later:  Note that the variant file this time also contains the main product  Then this is what happens: ACTION: Import main product, OK -&gt; ACTION: Product -&gt; Add characteristics ACTION: Product -&gt; Manage variants -&gt; delete all INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end, having no names INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: The variants are updated with the newly read information, as shown in phpMyAdmin INSPECT: The back-end shows the correct structure INSPECT: The front-end displays the variants with variant price and package suffix in the title --&gt; SUCCESS  Test case 4 The file for the product and variants, actually the same as test case 1:  And here are the test results: ACTION: Import OK -&gt; ACTION: Product -&gt; Manage variants -&gt; ACTION: Product -&gt; add characteristics ACTION: Product -&gt; Manage variants -&gt; select and delete all INSPECT: Unnamed variants still exists in the back-end  ACTION 2:Import again, same file, OK -&gt; INSPECT: Everything is fine --&gt; SUCCESS  Conclusions  &#42; To import variants, the file must also name the main product. Having the main product already loaded is not sufficient  &#42; The way to load variants is to first create these using &quot;add characteristics&quot;, then delete all created variants, then load the variants.  Can someone help here?  Thanks and regards,  Paul  -- HikaShop version -- : 2.3.0 Business edition -- Joomla version -- : 3.2.3 -- PHP version -- : 5.5.9-1 Ubuntu -- Browser(s) name and version -- : Chrome")* was created by *[paulvanharen](/forum/user/20480-paulvanharen "View paulvanharen's Profile")*

Hello there,

I'm trying to upload my shop inventory from CSV files. I would like to have a number of products, describing their specifications, and then add packaging variants with price information. E.g. as a product I may have chocolate, and as variant I may sell chocolate bars and chocolote boxes.

I've run several trials to get this working, but only with a D-tour it leads to success. In order to understand what's going on, I created some test cases to show things.

**Test case 1:**
The products to import Code:

product_name;product_code;product_type;product_parent_id;package;price_value chocolate;;main;;; chocolate-bar;;variant;chocolate;bar;3 chocolate-bottle;;variant;chocolate;bottle;4 chocolate-box;;variant;chocolate;box;5

And this is what happens:
ACTION: Import OK -&gt;

> 4 products found : 4 new products imported, 0 invalid product code, 0 already existing products

INSPECT: phpMyAdmin shows four products in the table #__hikashop_product
INSPECT: Variants recognized in the back-end, with correct pricing
INSPECT: All variants appear, prices are not updated when selecting a variant, no suffix is displayed for the variant in the product name.

ACTION: Product -&gt; Manage variants -&gt;

> Before configuring the variant of your product, you need to first create one or several characteristics with the menu Products-&gt;Characteristics, and then add one or several characteristics to your product

INSPECT: Variants are removed from the front-end; product is free
INSPECT: phpMyAdmin shows only one product in the table #__hikashop_product; all variants are gone
INSPECT: in the back-end, all variants are gone as well.

**Test case 2:**
The file to import the main product: Code:

product_name;product_code;product_type;product_parent_id;package;price_value candy;;main;;;

And the file to import all variants somewhat later: Code:

product_name;product_code;product_type;product_parent_id;package;price_value candy-bar;;variant;candy;bar;3 candy-bottle;;variant;candy;bottle;4 candy-box;;variant;candy;box;5

And this is what happens:
ACTION: Import main product,

> OK -&gt; 1 products found : 1 new products imported, 0 invalid product code, 0 already existing products

ACTION: Product -&gt; Add characteristics
INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product
INSPECT: Three variants are shown in the back-end
INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.

ACTION 2: Import variants, OK -&gt;

> 3 products found : 3 new products imported, 0 invalid product code, 0 already existing products

INSPECT: Three additional variants with name are now found in phpMyAdmin, making in total 6 variants
INSPECT: The newly imported variants are orphans
INSPECT: The newly imported variants don show in the back-end
INSPECT: No price information is available in the front-end

**Test case 3**
The file to import the main product Code:

product_name;product_code;product_type;product_parent_id;package;price_value cookie;;main;;;

The file to import the variants later: Code:

product_name;product_code;product_type;product_parent_id;package;price_value cookie;;main;;; cookie-bar;;variant;cookie;bar;3 cookie-bottle;;variant;cookie;bottle;4 cookie-box;;variant;cookie;box;5

Note that the variant file this time also contains the main product

Then this is what happens:
ACTION: Import main product, OK -&gt;

> 1 products found : 1 new products imported, 0 invalid product code, 0 already existing products

ACTION: Product -&gt; Add characteristics
ACTION: Product -&gt; Manage variants -&gt; delete all
INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product
INSPECT: Three variants are shown in the back-end, having no names
INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.

ACTION 2: Import variants, OK -&gt;

> 4 products found : 3 new products imported, 0 invalid product code, 1 already existing products

INSPECT: The variants are updated with the newly read information, as shown in phpMyAdmin
INSPECT: The back-end shows the correct structure
INSPECT: The front-end displays the variants with variant price and package suffix in the title --&gt; SUCCESS

**Test case 4**
The file for the product and variants, actually the same as test case 1: Code:

product_name;product_code;product_type;product_parent_id;package;price_value winegum;;main;;; winegum-bar;;variant;winegum;bar;3 winegum-bottle;;variant;winegum;bottle;4 winegum-box;;variant;winegum;box;5

And here are the test results:
ACTION: Import OK -&gt;

> 4 products found : 4 new products imported, 0 invalid product code, 0 already existing products

ACTION: Product -&gt; Manage variants -&gt;

> Before configuring the variant of your product, you need to first create one or several characteristics with the menu Products-&gt;Characteristics, and then add one or several characteristics to your product

ACTION: Product -&gt; add characteristics
ACTION: Product -&gt; Manage variants -&gt; select and delete all
INSPECT: Unnamed variants still exists in the back-end

ACTION 2:Import again, same file, OK -&gt;

> 4 products found : 3 new products imported, 0 invalid product code, 1 already existing products

INSPECT: Everything is fine --&gt; SUCCESS

**Conclusions**

- To import variants, the file must also name the main product. Having the main product already loaded is not sufficient
- The way to load variants is to first create these using "add characteristics", then delete all created variants, then load the variants.

Can someone help here?

Thanks and regards,

Paul

-- HikaShop version -- : 2.3.0 Business edition
-- Joomla version -- : 3.2.3
-- PHP version -- : 5.5.9-1 Ubuntu
-- Browser(s) name and version -- : Chrome

Last edit: 12 years 7 months ago by [paulvanharen](/forum/user/20480-paulvanharen "View paulvanharen's Profile"). Reason: typos

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjY5MTYtY3N2LWltcG9ydC1vZi12YXJpYW50cy1ub3QtYXMtZXhwZWN0ZWQ/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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

12 years 7 months ago [\#149756](#149756) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[CSV Import of variants not as expected](/forum/37-import-export-csv-xls/866916-csv-import-of-variants-not-as-expected#149756 "Hello there,  I'm trying to upload my shop inventory from CSV files. I would like to have a number of products, describing their specifications, and then add packaging variants with price information. E.g. as a product I may have chocolate, and as variant I may sell chocolate bars and chocolote boxes.  I've run several trials to get this working, but only with a D-tour it leads to success. In order to understand what's going on, I created some test cases to show things.  Test case 1:  The products to import  And this is what happens: ACTION: Import OK -&gt; INSPECT: phpMyAdmin shows four products in the table #&#95;&#95;hikashop&#95;product INSPECT: Variants recognized in the back-end, with correct pricing INSPECT: All variants appear, prices are not updated when selecting a variant, no suffix is displayed for the variant in the product name.  ACTION: Product -&gt; Manage variants -&gt; INSPECT: Variants are removed from the front-end; product is free INSPECT: phpMyAdmin shows only one product in the table #&#95;&#95;hikashop&#95;product; all variants are gone INSPECT: in the back-end, all variants are gone as well.  Test case 2:  The file to import the main product:  And the file to import all variants somewhat later:  And this is what happens: ACTION: Import main product, ACTION: Product -&gt; Add characteristics INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: Three additional variants with name are now found in phpMyAdmin, making in total 6 variants INSPECT: The newly imported variants are orphans INSPECT: The newly imported variants don show in the back-end INSPECT: No price information is available in the front-end  Test case 3 The file to import the main product  The file to import the variants later:  Note that the variant file this time also contains the main product  Then this is what happens: ACTION: Import main product, OK -&gt; ACTION: Product -&gt; Add characteristics ACTION: Product -&gt; Manage variants -&gt; delete all INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end, having no names INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: The variants are updated with the newly read information, as shown in phpMyAdmin INSPECT: The back-end shows the correct structure INSPECT: The front-end displays the variants with variant price and package suffix in the title --&gt; SUCCESS  Test case 4 The file for the product and variants, actually the same as test case 1:  And here are the test results: ACTION: Import OK -&gt; ACTION: Product -&gt; Manage variants -&gt; ACTION: Product -&gt; add characteristics ACTION: Product -&gt; Manage variants -&gt; select and delete all INSPECT: Unnamed variants still exists in the back-end  ACTION 2:Import again, same file, OK -&gt; INSPECT: Everything is fine --&gt; SUCCESS  Conclusions  &#42; To import variants, the file must also name the main product. Having the main product already loaded is not sufficient  &#42; The way to load variants is to first create these using &quot;add characteristics&quot;, then delete all created variants, then load the variants.  Can someone help here?  Thanks and regards,  Paul  -- HikaShop version -- : 2.3.0 Business edition -- Joomla version -- : 3.2.3 -- PHP version -- : 5.5.9-1 Ubuntu -- Browser(s) name and version -- : Chrome")*

Hi,

Here is how your CSV should be: Code:

product_name;product_code;product_type;product_parent_id;package;price_value chocolate;;main;;bar; chocolate-bar;;variant;chocolate;bar;3 chocolate-bottle;;variant;chocolate;bottle;4 chocolate-box;;variant;chocolate;box;5

Basically, you are missing the link between the main product and the characteristic in your CSV (which is where you actually define the default value of the characteristic for that product). That's why you got these issues.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjY5MTYtY3N2LWltcG9ydC1vZi12YXJpYW50cy1ub3QtYXMtZXhwZWN0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 45
- Thank you received: 0
-
-

12 years 7 months ago [\#149871](#149871) by [paulvanharen](/forum/user/20480-paulvanharen "View paulvanharen's Profile")  Replied by *[paulvanharen](/forum/user/20480-paulvanharen "View paulvanharen's Profile")* on topic *[CSV Import of variants not as expected](/forum/37-import-export-csv-xls/866916-csv-import-of-variants-not-as-expected#149871 "Hello there,  I'm trying to upload my shop inventory from CSV files. I would like to have a number of products, describing their specifications, and then add packaging variants with price information. E.g. as a product I may have chocolate, and as variant I may sell chocolate bars and chocolote boxes.  I've run several trials to get this working, but only with a D-tour it leads to success. In order to understand what's going on, I created some test cases to show things.  Test case 1:  The products to import  And this is what happens: ACTION: Import OK -&gt; INSPECT: phpMyAdmin shows four products in the table #&#95;&#95;hikashop&#95;product INSPECT: Variants recognized in the back-end, with correct pricing INSPECT: All variants appear, prices are not updated when selecting a variant, no suffix is displayed for the variant in the product name.  ACTION: Product -&gt; Manage variants -&gt; INSPECT: Variants are removed from the front-end; product is free INSPECT: phpMyAdmin shows only one product in the table #&#95;&#95;hikashop&#95;product; all variants are gone INSPECT: in the back-end, all variants are gone as well.  Test case 2:  The file to import the main product:  And the file to import all variants somewhat later:  And this is what happens: ACTION: Import main product, ACTION: Product -&gt; Add characteristics INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: Three additional variants with name are now found in phpMyAdmin, making in total 6 variants INSPECT: The newly imported variants are orphans INSPECT: The newly imported variants don show in the back-end INSPECT: No price information is available in the front-end  Test case 3 The file to import the main product  The file to import the variants later:  Note that the variant file this time also contains the main product  Then this is what happens: ACTION: Import main product, OK -&gt; ACTION: Product -&gt; Add characteristics ACTION: Product -&gt; Manage variants -&gt; delete all INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end, having no names INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: The variants are updated with the newly read information, as shown in phpMyAdmin INSPECT: The back-end shows the correct structure INSPECT: The front-end displays the variants with variant price and package suffix in the title --&gt; SUCCESS  Test case 4 The file for the product and variants, actually the same as test case 1:  And here are the test results: ACTION: Import OK -&gt; ACTION: Product -&gt; Manage variants -&gt; ACTION: Product -&gt; add characteristics ACTION: Product -&gt; Manage variants -&gt; select and delete all INSPECT: Unnamed variants still exists in the back-end  ACTION 2:Import again, same file, OK -&gt; INSPECT: Everything is fine --&gt; SUCCESS  Conclusions  &#42; To import variants, the file must also name the main product. Having the main product already loaded is not sufficient  &#42; The way to load variants is to first create these using &quot;add characteristics&quot;, then delete all created variants, then load the variants.  Can someone help here?  Thanks and regards,  Paul  -- HikaShop version -- : 2.3.0 Business edition -- Joomla version -- : 3.2.3 -- PHP version -- : 5.5.9-1 Ubuntu -- Browser(s) name and version -- : Chrome")*

Dear Nicolas,

Thanks for your help. Test case 1 is now indeed working.

If I apply the same fix to test case 2, it is still malfunctioning. Would you have any suggestion to fix test case 2, or is that simply not possible?

Thanks again, Paul

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjY5MTYtY3N2LWltcG9ydC1vZi12YXJpYW50cy1ub3QtYXMtZXhwZWN0ZWQ/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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

12 years 7 months ago [\#149903](#149903) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[CSV Import of variants not as expected](/forum/37-import-export-csv-xls/866916-csv-import-of-variants-not-as-expected#149903 "Hello there,  I'm trying to upload my shop inventory from CSV files. I would like to have a number of products, describing their specifications, and then add packaging variants with price information. E.g. as a product I may have chocolate, and as variant I may sell chocolate bars and chocolote boxes.  I've run several trials to get this working, but only with a D-tour it leads to success. In order to understand what's going on, I created some test cases to show things.  Test case 1:  The products to import  And this is what happens: ACTION: Import OK -&gt; INSPECT: phpMyAdmin shows four products in the table #&#95;&#95;hikashop&#95;product INSPECT: Variants recognized in the back-end, with correct pricing INSPECT: All variants appear, prices are not updated when selecting a variant, no suffix is displayed for the variant in the product name.  ACTION: Product -&gt; Manage variants -&gt; INSPECT: Variants are removed from the front-end; product is free INSPECT: phpMyAdmin shows only one product in the table #&#95;&#95;hikashop&#95;product; all variants are gone INSPECT: in the back-end, all variants are gone as well.  Test case 2:  The file to import the main product:  And the file to import all variants somewhat later:  And this is what happens: ACTION: Import main product, ACTION: Product -&gt; Add characteristics INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: Three additional variants with name are now found in phpMyAdmin, making in total 6 variants INSPECT: The newly imported variants are orphans INSPECT: The newly imported variants don show in the back-end INSPECT: No price information is available in the front-end  Test case 3 The file to import the main product  The file to import the variants later:  Note that the variant file this time also contains the main product  Then this is what happens: ACTION: Import main product, OK -&gt; ACTION: Product -&gt; Add characteristics ACTION: Product -&gt; Manage variants -&gt; delete all INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end, having no names INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: The variants are updated with the newly read information, as shown in phpMyAdmin INSPECT: The back-end shows the correct structure INSPECT: The front-end displays the variants with variant price and package suffix in the title --&gt; SUCCESS  Test case 4 The file for the product and variants, actually the same as test case 1:  And here are the test results: ACTION: Import OK -&gt; ACTION: Product -&gt; Manage variants -&gt; ACTION: Product -&gt; add characteristics ACTION: Product -&gt; Manage variants -&gt; select and delete all INSPECT: Unnamed variants still exists in the back-end  ACTION 2:Import again, same file, OK -&gt; INSPECT: Everything is fine --&gt; SUCCESS  Conclusions  &#42; To import variants, the file must also name the main product. Having the main product already loaded is not sufficient  &#42; The way to load variants is to first create these using &quot;add characteristics&quot;, then delete all created variants, then load the variants.  Can someone help here?  Thanks and regards,  Paul  -- HikaShop version -- : 2.3.0 Business edition -- Joomla version -- : 3.2.3 -- PHP version -- : 5.5.9-1 Ubuntu -- Browser(s) name and version -- : Chrome")*

Hi,

You can't import pieces of a product in different CSV files.
So the test case 2 won't work.
As you can see in my previous message, and as explained in the import documentation, the product and the variants must both be in the CSV so that the product data is valid

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjY5MTYtY3N2LWltcG9ydC1vZi12YXJpYW50cy1ub3QtYXMtZXhwZWN0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 2
- Thank you received: 0
-
-

12 years 5 months ago [\#156812](#156812) by [eurovideo](/forum/user/32709-eurovideo "View eurovideo's Profile")  Replied by *[eurovideo](/forum/user/32709-eurovideo "View eurovideo's Profile")* on topic *[CSV Import of variants not as expected](/forum/37-import-export-csv-xls/866916-csv-import-of-variants-not-as-expected#156812 "Hello there,  I'm trying to upload my shop inventory from CSV files. I would like to have a number of products, describing their specifications, and then add packaging variants with price information. E.g. as a product I may have chocolate, and as variant I may sell chocolate bars and chocolote boxes.  I've run several trials to get this working, but only with a D-tour it leads to success. In order to understand what's going on, I created some test cases to show things.  Test case 1:  The products to import  And this is what happens: ACTION: Import OK -&gt; INSPECT: phpMyAdmin shows four products in the table #&#95;&#95;hikashop&#95;product INSPECT: Variants recognized in the back-end, with correct pricing INSPECT: All variants appear, prices are not updated when selecting a variant, no suffix is displayed for the variant in the product name.  ACTION: Product -&gt; Manage variants -&gt; INSPECT: Variants are removed from the front-end; product is free INSPECT: phpMyAdmin shows only one product in the table #&#95;&#95;hikashop&#95;product; all variants are gone INSPECT: in the back-end, all variants are gone as well.  Test case 2:  The file to import the main product:  And the file to import all variants somewhat later:  And this is what happens: ACTION: Import main product, ACTION: Product -&gt; Add characteristics INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: Three additional variants with name are now found in phpMyAdmin, making in total 6 variants INSPECT: The newly imported variants are orphans INSPECT: The newly imported variants don show in the back-end INSPECT: No price information is available in the front-end  Test case 3 The file to import the main product  The file to import the variants later:  Note that the variant file this time also contains the main product  Then this is what happens: ACTION: Import main product, OK -&gt; ACTION: Product -&gt; Add characteristics ACTION: Product -&gt; Manage variants -&gt; delete all INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end, having no names INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: The variants are updated with the newly read information, as shown in phpMyAdmin INSPECT: The back-end shows the correct structure INSPECT: The front-end displays the variants with variant price and package suffix in the title --&gt; SUCCESS  Test case 4 The file for the product and variants, actually the same as test case 1:  And here are the test results: ACTION: Import OK -&gt; ACTION: Product -&gt; Manage variants -&gt; ACTION: Product -&gt; add characteristics ACTION: Product -&gt; Manage variants -&gt; select and delete all INSPECT: Unnamed variants still exists in the back-end  ACTION 2:Import again, same file, OK -&gt; INSPECT: Everything is fine --&gt; SUCCESS  Conclusions  &#42; To import variants, the file must also name the main product. Having the main product already loaded is not sufficient  &#42; The way to load variants is to first create these using &quot;add characteristics&quot;, then delete all created variants, then load the variants.  Can someone help here?  Thanks and regards,  Paul  -- HikaShop version -- : 2.3.0 Business edition -- Joomla version -- : 3.2.3 -- PHP version -- : 5.5.9-1 Ubuntu -- Browser(s) name and version -- : Chrome")*

Sorry i have this situation:
"product_parent_id";"product_name";"product_code";"product_type";"product_manufacturer_id";"product_keywords";"categories";"price_value";"price_currency_id";"options";"capienza";"specifiche";"canali";"regolazione"
"Manfrotto_MB 401N";;"Manfrotto_MB 401N_6";"variant";61;"Manfrotto_MB 401N";;64,14;"EUR";;;"Specifiche";;
;"Manfrotto Pro V Zaino nero medio";"Manfrotto_MB LB050-5BB";"main";61;"Manfrotto_MB LB050-5BB";"Accessori;Borse";;;;;"Specifiche";;

where specifiche is a characteristic and Specifiche is the variant.
After import i get the relation between the main and the variant but in the administration panel of the product the characteristic field is empty. If I try to add the specifiche characteristic then everithing appears with the right values. How I get this field filled after import?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjY5MTYtY3N2LWltcG9ydC1vZi12YXJpYW50cy1ub3QtYXMtZXhwZWN0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 5 months ago [\#156909](#156909) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[CSV Import of variants not as expected](/forum/37-import-export-csv-xls/866916-csv-import-of-variants-not-as-expected#156909 "Hello there,  I'm trying to upload my shop inventory from CSV files. I would like to have a number of products, describing their specifications, and then add packaging variants with price information. E.g. as a product I may have chocolate, and as variant I may sell chocolate bars and chocolote boxes.  I've run several trials to get this working, but only with a D-tour it leads to success. In order to understand what's going on, I created some test cases to show things.  Test case 1:  The products to import  And this is what happens: ACTION: Import OK -&gt; INSPECT: phpMyAdmin shows four products in the table #&#95;&#95;hikashop&#95;product INSPECT: Variants recognized in the back-end, with correct pricing INSPECT: All variants appear, prices are not updated when selecting a variant, no suffix is displayed for the variant in the product name.  ACTION: Product -&gt; Manage variants -&gt; INSPECT: Variants are removed from the front-end; product is free INSPECT: phpMyAdmin shows only one product in the table #&#95;&#95;hikashop&#95;product; all variants are gone INSPECT: in the back-end, all variants are gone as well.  Test case 2:  The file to import the main product:  And the file to import all variants somewhat later:  And this is what happens: ACTION: Import main product, ACTION: Product -&gt; Add characteristics INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: Three additional variants with name are now found in phpMyAdmin, making in total 6 variants INSPECT: The newly imported variants are orphans INSPECT: The newly imported variants don show in the back-end INSPECT: No price information is available in the front-end  Test case 3 The file to import the main product  The file to import the variants later:  Note that the variant file this time also contains the main product  Then this is what happens: ACTION: Import main product, OK -&gt; ACTION: Product -&gt; Add characteristics ACTION: Product -&gt; Manage variants -&gt; delete all INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end, having no names INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: The variants are updated with the newly read information, as shown in phpMyAdmin INSPECT: The back-end shows the correct structure INSPECT: The front-end displays the variants with variant price and package suffix in the title --&gt; SUCCESS  Test case 4 The file for the product and variants, actually the same as test case 1:  And here are the test results: ACTION: Import OK -&gt; ACTION: Product -&gt; Manage variants -&gt; ACTION: Product -&gt; add characteristics ACTION: Product -&gt; Manage variants -&gt; select and delete all INSPECT: Unnamed variants still exists in the back-end  ACTION 2:Import again, same file, OK -&gt; INSPECT: Everything is fine --&gt; SUCCESS  Conclusions  &#42; To import variants, the file must also name the main product. Having the main product already loaded is not sufficient  &#42; The way to load variants is to first create these using &quot;add characteristics&quot;, then delete all created variants, then load the variants.  Can someone help here?  Thanks and regards,  Paul  -- HikaShop version -- : 2.3.0 Business edition -- Joomla version -- : 3.2.3 -- PHP version -- : 5.5.9-1 Ubuntu -- Browser(s) name and version -- : Chrome")*

Hi,

It's better to create the characteristics with the desired variants and then import the products with the variant value set.

So thanks to create the characteristic via Product &gt; Characteristics and then import the desired product.

[ hikashop.com/support/support/documentati...hikashop-import.html](https://hikashop.com/support/support/documentation/73-hikashop-import.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjY5MTYtY3N2LWltcG9ydC1vZi12YXJpYW50cy1ub3QtYXMtZXhwZWN0ZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 2
- Thank you received: 0
-
-

12 years 5 months ago [\#156920](#156920) by [eurovideo](/forum/user/32709-eurovideo "View eurovideo's Profile")  Replied by *[eurovideo](/forum/user/32709-eurovideo "View eurovideo's Profile")* on topic *[CSV Import of variants not as expected](/forum/37-import-export-csv-xls/866916-csv-import-of-variants-not-as-expected#156920 "Hello there,  I'm trying to upload my shop inventory from CSV files. I would like to have a number of products, describing their specifications, and then add packaging variants with price information. E.g. as a product I may have chocolate, and as variant I may sell chocolate bars and chocolote boxes.  I've run several trials to get this working, but only with a D-tour it leads to success. In order to understand what's going on, I created some test cases to show things.  Test case 1:  The products to import  And this is what happens: ACTION: Import OK -&gt; INSPECT: phpMyAdmin shows four products in the table #&#95;&#95;hikashop&#95;product INSPECT: Variants recognized in the back-end, with correct pricing INSPECT: All variants appear, prices are not updated when selecting a variant, no suffix is displayed for the variant in the product name.  ACTION: Product -&gt; Manage variants -&gt; INSPECT: Variants are removed from the front-end; product is free INSPECT: phpMyAdmin shows only one product in the table #&#95;&#95;hikashop&#95;product; all variants are gone INSPECT: in the back-end, all variants are gone as well.  Test case 2:  The file to import the main product:  And the file to import all variants somewhat later:  And this is what happens: ACTION: Import main product, ACTION: Product -&gt; Add characteristics INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: Three additional variants with name are now found in phpMyAdmin, making in total 6 variants INSPECT: The newly imported variants are orphans INSPECT: The newly imported variants don show in the back-end INSPECT: No price information is available in the front-end  Test case 3 The file to import the main product  The file to import the variants later:  Note that the variant file this time also contains the main product  Then this is what happens: ACTION: Import main product, OK -&gt; ACTION: Product -&gt; Add characteristics ACTION: Product -&gt; Manage variants -&gt; delete all INSPECT: Three additional products without name are found in phpMyAdmin, all child of the just imported product INSPECT: Three variants are shown in the back-end, having no names INSPECT: Three variants are shown in the front-end, suffixes are displayed for the variant in the product name. No variant has a price, which is in-line with expectations.  ACTION 2: Import variants, OK -&gt; INSPECT: The variants are updated with the newly read information, as shown in phpMyAdmin INSPECT: The back-end shows the correct structure INSPECT: The front-end displays the variants with variant price and package suffix in the title --&gt; SUCCESS  Test case 4 The file for the product and variants, actually the same as test case 1:  And here are the test results: ACTION: Import OK -&gt; ACTION: Product -&gt; Manage variants -&gt; ACTION: Product -&gt; add characteristics ACTION: Product -&gt; Manage variants -&gt; select and delete all INSPECT: Unnamed variants still exists in the back-end  ACTION 2:Import again, same file, OK -&gt; INSPECT: Everything is fine --&gt; SUCCESS  Conclusions  &#42; To import variants, the file must also name the main product. Having the main product already loaded is not sufficient  &#42; The way to load variants is to first create these using &quot;add characteristics&quot;, then delete all created variants, then load the variants.  Can someone help here?  Thanks and regards,  Paul  -- HikaShop version -- : 2.3.0 Business edition -- Joomla version -- : 3.2.3 -- PHP version -- : 5.5.9-1 Ubuntu -- Browser(s) name and version -- : Chrome")*

Now I created another characteriscic called "singolo", with a variant called "scheda" and now everithing is working. Maybe calling the characteristic and the variant with te same name such "Specifiche" and "specifiche" will give this error. Thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NjY5MTYtY3N2LWltcG9ydC1vZi12YXJpYW50cy1ub3QtYXMtZXhwZWN0ZWQ/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.243 seconds

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

[](#top)
