Problems with Import

  • Posts: 57
  • Thank you received: 2
12 years 3 months ago #35489

Hi,

I have some problems with the import products from csv (file and window).

I have exported a bunch of products and changed the name and the product_code (only one glyph has been changed BC1120ACFFP01 -> BC1120BCFFP01 ) with TextWrangler.
After that I tried to import the file to add new products. But Hika shop always told me, he has updated existing ones. Most times the products only were updated, but sometimes s o m e products were added.
Chaning the ID did not change anything
Is there something wrong with my way of adding products. Or is the produtc code invalid?

Cheers!

File Attachment:

File Name: hikashopex...0114.csv
File Size:9 KB

Attachments:

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
12 years 3 months ago #35527

Hi,

Your CSV is OK.
When a product is already in the database with the same code as in the CSV, the information of the product will be updated with the one from the CSV.
When a product is not in the database for a product code in the CSV, a new product will be created in the database from the CSV information.
That's all there is to it.
The product_id column is always discarded during the import and it's the code which is used to match the products.

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

  • Posts: 57
  • Thank you received: 2
12 years 3 months ago #35651

Hi,

Then something is going wrong here.
When I import the cvs with changed names and changed Product_code, there is always the same message and result: 28 products found : 0 new products imported, 7 invalid product code, 21 already existing products,
and no matter if "Update products information if the product_code already exists" is set to yes or no, the previously exported products will be updated. Thats why I thought the update process relies on something else than the product_code field.

Cheers.

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
12 years 3 months ago #35688

If you change the product code in the CSV, I don't see how the system would be able to update the previous products which have different product codes.

There must be something else and it's not in HikaShop as that is working fine for everyone else.

Also, I see that you have invalid product codes. Did you use that CSV to produce this message ?

If you try to import the CSV via the textarea instead of uploading it (you need to open it via notepad++, and copy/paste the content in the textarea), do you have the same problem?

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

  • Posts: 57
  • Thank you received: 2
12 years 3 months ago #35707

Hi,

Yes, I used that CSV. The invalid product codes are depended on the categories, but this seems not to change anything.
And yes, it's the same behaviour from the textarea.

I have checked it all again and found out, that it is related to the product_id - unlike what I wrote first. If I leave the id untouched, products are updated and if I set it to "0", new ones are added.

The radio "Update products information if the product_code already exists" does not change anything.


Cheers.

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

  • Posts: 81540
  • Thank you received: 13069
  • MODERATOR
12 years 3 months ago #35770

Hi,

Yes you're right. I checked on our end and looked at the code and indeed, we changed the way the import works in a previous version so that it handles the product_id column if specified, overriding the "Update products information if the product_code already exists" option.
So you should delete the product_id column in your CSV if you want to create new products.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum