How to Manage Characteristics of a product

  • Posts: 4
  • Thank you received: 0
11 years 10 months ago #91422

Hello,

i am writting a code to insert Characteristics in hikashop table.
suppose we have to varient
Size:
S
M
L

color:
red
green
blue

i want to add this for a product. i am not using the joomla funtion or hikashop function.

please tell me how to add varient for this product.

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

  • Posts: 14
  • Thank you received: 4
11 years 10 months ago #91447

Let me get this straight... You are writing a script/code to create the Characteristics for a product by inserting directly into the HikaShop MySQL tables. Is this correct?

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

  • Posts: 83050
  • Thank you received: 13412
  • MODERATOR
11 years 10 months ago #91617

That's quite complex.

First, if the characteristic data is not in the hikashop_characteristic table, you need to add it there.
Then, you need to link the characteristic and the value to the product via the hikashop_variant table.
Then, you need to create one variant for each combination of values in the hikashop_product table (with the product_parent_id being the id of the main product.
Finally, you need to link each characteristic value to the corresponding variants in hikashop_product via the hikashop_variant table.

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

  • Posts: 4
  • Thank you received: 0
11 years 10 months ago #91628

Hello winchester,

ya you are right.. that is i want to do.

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

  • Posts: 4
  • Thank you received: 0
11 years 10 months ago #91630

Hello nicolas,

Thanks for your reply. i have done it same as you have mentioned. but i am not deleting records from hikashop_product & hikashop_variant table.
as you delete the previous entry when any new characteristic are added. if i don't delete the records, there will be any problem in future ?

Thanks
Hemant

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

  • Posts: 83050
  • Thank you received: 13412
  • MODERATOR
11 years 10 months ago #91780

Hi,

I'm not following you ? I never talked about deleting anything.

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

Time to create page: 0.076 seconds
Powered by Kunena Forum