From 13b93ddaefa4a5598b1a1fa17f69da0a44ed65b3 Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Thu, 26 Jul 2012 13:46:19 +0000 Subject: [PATCH] [-] BO : fixed bug #PSCFV-3338 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16583 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Category.php | 1 + classes/Product.php | 1 + 2 files changed, 2 insertions(+) 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 );