Problems linking related products

  • Posts: 44
  • Thank you received: 1
12 years 10 months ago #36018

Hi,
I am experiencing problems linking newly defined products with products that already exist within my Hikashop database. The two example datasets below illustrate the problem:

product_name,product_code,related
testprod1,testprod1-ABCD,""
testprod2,testprod2,testprod1-ABCD

The dataset above creates the two new products and links testprod1 to the second product testprod2

product_name,product_code,related
testprod1,testprod1-ABCD,""
testprod2,testprod2,2214419;testprod1-ABCD

The second dataset above also creates testprod1 and testprod2 OK. It also links creates the link so that testprod1 becomes related to testprod2. However, it refuses to link the other product (2214419, which exists elsewhere within my Hikashop database) to successfully with testprod2.

Help appreciated.
PhilP
Hikashop Business 1.5.4 user

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #36052

Hi,

You shouldn't use 2214419 but the product code of your already existing product.

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

  • Posts: 44
  • Thank you received: 1
12 years 10 months ago #36098

Yes, the product code 2214419 does already exist in Hikashop. It was created earlier.

I have just spent 1/2 hour testing this more fully and attach a file showing what I found.

It seems that Hikashop does not like numeric values only when looking for related products. It will link a product name, an alpha-only product code, an alphanumeric product code and a numeric value which matches a product ID (i.e. a Joomla entity ID)
However it does not seem to find a product code which is numeric only.

Hope that helps

Regards
PhilP

File Attachment:

File Name: Test_datas...s_v2.txt
File Size:1 KB

Attachments:

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #36100

Yes, if you use a numeric value for a product code in related, options column, the system will assume that you're referring to a product id and not a product code.
So you should refrain from using only numbers in product codes if you plan to use them in a CSV import.

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

  • Posts: 44
  • Thank you received: 1
12 years 10 months ago #36101

Ok - thanks.
All of our products have numeric-only product codes and there is no problem in doing the initial import with them. I will use the product names to link the related products rather than the product codes.

It would be good to see Hikashop help updated to clarify this restriction.

Also, perhaps add the use of numeric-only product codes to link related products to the development wish list? :)

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #36151

There is nothing to do unfortunately. It's not only for related items but for everything else too.
If you create a category called 111 and that you try to assign a product of your CSV to that category, it won't work too because the system will consider that you're giving a category id.
That allows the products import to be a lot more efficient as it doesn't have to check in the database to know if a category (or a product) already exists with that id or with that name as it assumes that if an integer is given, it's an id.
Because of that, we don't plan to change the way it's done for now.

The following user(s) said Thank You: PhilP

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

Time to create page: 0.043 seconds
Powered by Kunena Forum