- Posts: 1184
- Thank you received: 13
import procedure create new product id's
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
Do you see any error?
problematic product code 153g (main) 472 line
variants lines 559 to 564
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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
I attach the CSV I used. You can see I left only that 153g product and removed the unnessecary columns.
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.
Please Log in or Create an account to join the conversation.
So my attached file should normally work?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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>characteristics to make sure that the values are exactly the same as you have in the CSV file (no extra space) ?
Please Log in or Create an account to join the conversation.
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?
Please Log in or Create an account to join the conversation.
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:
Please Log in or Create an account to join the conversation.