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

#   import procedure create new product id's

##

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

4 years 6 months ago [\#341390](#341390) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#341390 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")* was created by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")*

-- HikaShop version -- : 4.5.1
-- Joomla version -- : 3.10.8
-- PHP version -- : 7.4

Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database

[ ![0-02-05-08eb99efc7b913cdc42b829fd7aa2101bb67a4f0e8fc97651ae6b070f44be001&#95;c1faad381a47ebec.png](/forum/attachment/54777) ](/forum/attachment/54777 "...381a47ebec.png")

both parent id and product id are the same

- [ ![0-02-05-08eb99efc7b913cdc42b829fd7aa2101bb67a4f0e8fc97651ae6b070f44be001&#95;c1faad381a47ebec.png](/forum/attachment/54777) ](/forum/attachment/54777 "...381a47ebec.png") [ ](/forum/attachment/54777?download=1 "...381a47ebec.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ltcG9ydC1leHBvcnQtY3N2LXhscy85MDQzNjctaW1wb3J0LXByb2NlZHVyZS1jcmVhdGUtbmV3LXByb2R1Y3QtaWQtcz90bXBsPW1hcmtkb3du) 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: 86357
- Thank you received: 14289
-
-

4 years 6 months ago [\#341394](#341394) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#341394 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Hi,

This sounds like the value entered under the column of the characteristic in your CSV doesn't exist for that characteristic in the HikaShop backend.
For example, if you have an extra space at the end of the value for that characteristic, this could happen. And in that case, since the system can create the variant, but doesn't know to which value it should assign the variant for that characteristic, there would be no value displayed in the column of that characteristic for the variants with the issue.

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

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

4 years 5 months ago [\#341743](#341743) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#341743 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Please check the file I uploaded, I only erased the prices.
Do you see any error?
problematic product code 153g (main) 472 line
variants lines 559 to 564

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ltcG9ydC1leHBvcnQtY3N2LXhscy85MDQzNjctaW1wb3J0LXByb2NlZHVyZS1jcmVhdGUtbmV3LXByb2R1Y3QtaWQtcz90bXBsPW1hcmtkb3du) 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: 86357
- Thank you received: 14289
-
-

4 years 5 months ago [\#341749](#341749) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#341749 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Hi,

You're missing the columns for the characteristics of your products / variants in your CSV.

I would recommend you to check the section "Importing products with variants" of our import documentation here:
[ www.hikashop.com/support/documentation/7...shop-import.html#csv](https://www.hikashop.com/support/documentation/73-hikashop-import.html#csv)

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

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

4 years 4 months ago -  4 years 4 months ago [\#342842](#342842) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#342842 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Hello!
We tried to import with the new columns (characteristics) and default value on the main product. But again it created the unecessary rows
Please check printscreens and csv imported.
I can give you backend if its possible to try it yourself.

Thanks

Last edit: 4 years 4 months ago by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile"). Reason: Not all files were uploaded

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

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

4 years 4 months ago [\#342843](#342843) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#342843 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

[ ![viber&#95;image&#95;2022-06-28&#95;00-28-18-991&#95;2022-06-28.jpg](/forum/attachment/55125) ](/forum/attachment/55125 "...2022-06-28.jpg")

[ ![viber&#95;image&#95;2022-06-28&#95;00-28-22-684&#95;2022-06-28.jpg](/forum/attachment/55126) ](/forum/attachment/55126 "...2022-06-28.jpg")

[ ![viber&#95;image&#95;2022-06-28&#95;18-16-27-553.jpg](/forum/attachment/55127) ](/forum/attachment/55127 "...-16-27-553.jpg")

- [ ![viber&#95;image&#95;2022-06-28&#95;00-28-18-991&#95;2022-06-28.jpg](/forum/attachment/55125) ](/forum/attachment/55125 "...2022-06-28.jpg") [ ](/forum/attachment/55125?download=1 "...2022-06-28.jpg")
- [ ![viber&#95;image&#95;2022-06-28&#95;00-28-22-684&#95;2022-06-28.jpg](/forum/attachment/55126) ](/forum/attachment/55126 "...2022-06-28.jpg") [ ](/forum/attachment/55126?download=1 "...2022-06-28.jpg")
- [ ![viber&#95;image&#95;2022-06-28&#95;18-16-27-553.jpg](/forum/attachment/55127) ](/forum/attachment/55127 "...-16-27-553.jpg") [ ](/forum/attachment/55127?download=1 "...-16-27-553.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ltcG9ydC1leHBvcnQtY3N2LXhscy85MDQzNjctaW1wb3J0LXByb2NlZHVyZS1jcmVhdGUtbmV3LXByb2R1Y3QtaWQtcz90bXBsPW1hcmtkb3du) 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: 86357
- Thank you received: 14289
-
-

4 years 4 months ago [\#342844](#342844) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#342844 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Hi,

You can't have "0" for the columns of characteristics you don't want to use for a variant / main product. You should have a completely empty cell.
Here, the system thinks you're trying to add variants with characteristics with a "0" value.

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

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

4 years 4 months ago [\#342958](#342958) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#342958 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Hello Nicolas and thank you for the reply!
I tried as adviced but still these extra variants are created.
Please check my scv.
Look for the groduct with product_code : 153g
This is the main product that has the default value (L) for Large and his variants as you chech product_parent_id: 153g

But again we have dublicated entries see screenshot 2

- [ ![Screenshot2022-07-03at11.47.18PM.png](/forum/attachment/55143) ](/forum/attachment/55143 "...11.47.18PM.png") [ ](/forum/attachment/55143?download=1 "...11.47.18PM.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ltcG9ydC1leHBvcnQtY3N2LXhscy85MDQzNjctaW1wb3J0LXByb2NlZHVyZS1jcmVhdGUtbmV3LXByb2R1Y3QtaWQtcz90bXBsPW1hcmtkb3du) 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: 86357
- Thank you received: 14289
-
-

4 years 4 months ago -  4 years 4 months ago [\#342964](#342964) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#342964 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Hi,

I made tests with HikaShop 4.6.1's import tool with a simplified version of your CSV file and it works just fine:
[ i.imgur.com/jNeh2Ts.png](https://i.imgur.com/jNeh2Ts.png)

I attach the CSV I used. You can see I left only that 153g product and removed the unnessecary columns.
*This attachment is hidden for guests.
Please log in or register to see it.*

So either there is still a problem with the CSV you're using, or there is a problem with the settings of the characteristic "size" itself, or your HikaShop has a bug which mean doesn't, but I don't recall any issue regarding the import of variants that we fixed.

Last edit: 4 years 4 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

4 years 4 months ago [\#342980](#342980) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#342980 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Hello.
So my attached file should normally work?

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

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

4 years 4 months ago [\#342983](#342983) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#342983 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

If you import this csv , in my installation I get all ok in the db (see attached) but in the backend there is no

- [ ![Screenshot&#95;2&#95;2022-07-04.jpg](/forum/attachment/55151) ](/forum/attachment/55151 "...2022-07-04.jpg") [ ](/forum/attachment/55151?download=1 "...2022-07-04.jpg")
- [ ![Screenshot&#95;4.jpg](/forum/attachment/55152) ](/forum/attachment/55152 "Screenshot&#95;4.jpg") [ ](/forum/attachment/55152?download=1 "Screenshot&#95;4.jpg")
- [ ![Screenshot&#95;3&#95;2022-07-04.jpg](/forum/attachment/55153) ](/forum/attachment/55153 "...2022-07-04.jpg") [ ](/forum/attachment/55153?download=1 "...2022-07-04.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ltcG9ydC1leHBvcnQtY3N2LXhscy85MDQzNjctaW1wb3J0LXByb2NlZHVyZS1jcmVhdGUtbmV3LXByb2R1Y3QtaWQtcz90bXBsPW1hcmtkb3du) 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: 86357
- Thank you received: 14289
-
-

4 years 4 months ago -  4 years 4 months ago [\#342982](#342982) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#342982 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Hi,

Yes. It works fine on my end (minus the missing columns that I didn't create on my end like xml_show).
Please note however that you've changed the product_code of your variants. Before they had a space between 153G and the size. If the variant doesn't have the same product_code between the CSV and the database, the system won't be able to update it and that could explain why it's adding extra variants instead of updating them.

Now there is a solution to this:
If you turn off the "KEEP_OTHER_VARIANTS" setting, the import will delete the old variants when importing the new ones, so it will be as if it was replacing them (although the information not provided in the CSV and already in the variants in the database will be lost (like for example the "product_description").

Also, did you check the "values" of the characteistic itself in the menu Products&gt;characteristics to make sure that the values are exactly the same as you have in the CSV file (no extra space) ?

Last edit: 4 years 4 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

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

Less More

- Posts: 1195
- Thank you received: 13
-
-

3 years 9 months ago [\#348313](#348313) by [verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")  Replied by *[verzevoul](/forum/user/8351-verzevoul "View verzevoul's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#348313 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Hello Nicolas!
In this matter we still get a problem .
Whan we import csv as we already discussed we have as parent _ id the product code. And in some cases it doesn t work. I think it doesn t work when the value is int. Is it true?
Because for examle you see attached the product with code 153 that has some variants. They where created in the database but with the wrong parent_id.
It should be 939 because id 939 has product code 153.
But if its code was 153f (for example) not just int, import i think works.
Is it true? How can we overcome this?

- [ ![Screenshot&#95;1&#95;2023-01-13.jpg](/forum/attachment/56318) ](/forum/attachment/56318 "...2023-01-13.jpg") [ ](/forum/attachment/56318?download=1 "...2023-01-13.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2ltcG9ydC1leHBvcnQtY3N2LXhscy85MDQzNjctaW1wb3J0LXByb2NlZHVyZS1jcmVhdGUtbmV3LXByb2R1Y3QtaWQtcz90bXBsPW1hcmtkb3du) 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: 86357
- Thank you received: 14289
-
-

3 years 9 months ago [\#348316](#348316) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[import procedure create new product id's](/forum/37-import-export-csv-xls/904367-import-procedure-create-new-product-ids#348316 "-- HikaShop version -- : 4.5.1 -- Joomla version -- : 3.10.8 -- PHP version -- : 7.4  Ιmport procedure create new product id's : 153GM 153GXS 153GXL 153GXXL while the mentioned product id already exist in database  both parent id and product id are the same")*

Hi,

Indeed. If you provide an integer, then the system will think you're referencing a product_id and not a product_code and so it will first look for the product with that product_id and only if it doesn't find it, it will look for the a product with that product_code.
There are three ways to overcome this:
- don't use a number for the product_code
- use a number which isn't a product_id
- delete the code: Code:

if(is_numeric($parent_code)){ foreach($products as $k2 =&gt; $main){ if($variant-&gt;product_parent_id == @$main-&gt;product_id){ $parent_code=$main-&gt;product_code; } } }

from hikashop/administrator/components/com_hikashop/helpers/import.php so that it doesn't look for the product_id, only product_code

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

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