Skip to main content

How to Manage Characteristics of a product

More
13 years 8 months ago #91422 by hemant
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.

More
13 years 8 months ago #91447 by winchester
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.

More
13 years 8 months ago #91617 by nicolas
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.

More
13 years 8 months ago #91628 by hemant
Hello winchester,

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

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

More
13 years 8 months ago #91630 by hemant
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.

More
13 years 8 months ago #91780 by nicolas
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.125 seconds
Powered by Kunena Forum