I am doing a new module and I want to know how to update and insert values in a table when I save the product options in the back office.
I try this but I dont know if the code its ok or where to place it:
Db::getInstance()->update('ps_product_shop', array(
'customizable' => 2,
));
$query = "UPDATE `"._DB_PREFIX_."product` SET customizable=1 WHERE id_product =".$product->id_product.";";
Db::getInstance()->Execute($query);
I try both in hookdisplayAdminProductsExtra and in hookActionProductUpdate