Hi,
Well that's what I am trying to do. It works fine for new product or update product but I can't update product code of the copied product. I think my query is wrong. Should I use UPDATE or INSERT with query?
As example for new product created I have this in function onBeforeProductCreate:
$query="Select product_code from #__hikashop_product where product_code='".$code."'";
And for function onBeforeProductCopy:
$query="UPDATE #__hikashop_product SET product_code='".$code."' where product_id='".$id."'";
What it does it changes the main product product code and not the copied one. I am not sure how should I select the product who not exist yet using query?
I am not asking to code for me. I just want to see how hikashop done it by default. That's why I would like to see in what file product code gets generated when product copied by default.
Thanks