My Problem is, i have 4 languages in my shop and if the user orders in french, thenn the products_name in the orders_products table is also in french
And for us it's difficult to manage this in the shop ...so my question. what is the easiesst, best way to save in the mysql table the default language of the products_name
my idea is to make a hook to update it with the right language as i have done with manufacturers_id
Code: Select all
class hook_shop_checkout_process__15_update_manufacturers_id {
public function listen_startCheckout() {
$GLOBALS['db']->query(sprintf(<<<'EOSQL'
UPDATE orders_products op INNER JOIN products p ON op.products_id = p.products_id
SET op.manufacturers_id = p.manufacturers_id
WHERE op.orders_id = %d
EOSQL
, $GLOBALS['order_id']));
}
}
thanks in advance!