Importing Attribute Products breaks the Codes

  • Posts: 256
  • Thank you received: 21
10 years 3 months ago #168439

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 2.5.24

I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under "manage attributes" I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.

On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product_id

On import I have set "Update Products Information....." to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.

Attachments:
Last edit: 10 years 3 months ago by rodfarrell.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #168548

In your import file, remove the column product_id and in the product_parent_id column of the variants enter the product_code of the parent product of the variants and it should then work properly.

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

  • Posts: 256
  • Thank you received: 21
10 years 3 months ago #168581

That successfully imports the variants but it creates new product codes for them instead of using the ones we are importing and it doesn't import the rest of the data such as images and prices.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 months ago #168627

Hi,

Would it be possible to have the latest version of your CSV in order to check it ?

Did you check the section "Importing products with variants" in the import documentation ?
www.hikashop.com/support/documentation/i...hikashop-import.html
Maybe it can provide you some help too.

Thanks,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 256
  • Thank you received: 21
10 years 3 months ago #168685

Thanks Jerome, yes i have read the very limited import documentation a number of times but it sheds no light on why it is not working. Attached is the latest csv file. The variant product codes are being replaced with the generic codes and none of the content from the other columns is being imported.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 2 months ago #168690

In your variants, you use "Sports Bottle" in the product_parent_id and in your product, you use "Sports_Bottle" in the product_code.
Please use the same text (with the _) and it should work better. The rest of the CSV looks fine.

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

  • Posts: 256
  • Thank you received: 21
10 years 2 months ago #168744

Does that mean we can't use an actual product code (sku) but only the generic code Hikashop generates? Why is the product code field allowed to be edited if that is the case?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #168748

Hi,

That's not what Nicolas told you.

He told you that you use a product_code but in your variant, you said that the product' parent is "another" product because the product_code you put is not the right one.
Just use the same value for the product_code and the product_parent_id in order to have some consistency.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 256
  • Thank you received: 21
10 years 2 months ago #168802

Ahhhhh, sorry my mistake. Its a bit counter intuitive having a column called parent_id when it is actually the parent product code, not the id. I panicked when I thought I would have to recreate hundreds of variant products and use a custom field for product sku's when we have already written an SAP integration and a TrueERP integration using the product code field. Time for a lie down. :woohoo:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #168815

Hi,

The column ask for the an "id" but when you create a new product, you can't know the "id" of the product you will create (because you add a new one, you're not updating an existing product).
That's why, the column also accept a "product_code" which is unique in the database.

When the import see that the "id" is not a number, it will look in the "code" to find the good one.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum