combination_hash how to create?


I'm developing a function helping me to create product with options from selected products.

For ex. I select 10 products from a product list on the admin panel, than push a button and the script creates one product with 10 options (same product but different colors, prices, amount and photos). Whole script is written but I have a problem with attaching photos becouse of $combination_hash - I do not know how to create it…

I will be gratefull for any help.



Hallo, anyone know how to calculate this value in the field “combination_hash” in table cscart_product_options_inventory ?

I try to search everywhere but nothing.