diff --git a/classes/Category.php b/classes/Category.php index 35396a13b..5b09c9159 100644 --- a/classes/Category.php +++ b/classes/Category.php @@ -1308,6 +1308,7 @@ class CategoryCore extends ObjectModel SELECT c.`id_category`, cl.`name`, cl.`link_rewrite`, cl.`id_lang` FROM `'._DB_PREFIX_.'category` c LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').') + '.Shop::addSqlAssociation('category', 'c').' WHERE cl.`id_lang` = '.(int)$id_lang.' AND c.`id_category` IN ('.implode(',', array_map('intval', $ids_category)).') '); diff --git a/classes/Product.php b/classes/Product.php index 442ce3df3..1811a863c 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -2135,6 +2135,7 @@ class ProductCore extends ObjectModel $row = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT cp.`id_category`, cl.`name`, cl.`link_rewrite` FROM `'._DB_PREFIX_.'category_product` cp LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (cp.`id_category` = cl.`id_category`'.Shop::addSqlRestrictionOnLang('cl').') + '.Shop::addSqlAssociation('category', 'cp').' WHERE cp.`id_product` = '.(int)$id_product.' AND cl.`id_lang` = '.(int)$id_lang );