// Fix all product_lang sql restrictions with multishop

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8121 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-19 14:01:23 +00:00
parent c7d4290206
commit 7cadad5d3e
26 changed files with 146 additions and 141 deletions
+2
View File
@@ -108,6 +108,7 @@ if (isset($_GET['ajaxProductAccessories']))
FROM `'._DB_PREFIX_.'product` p
NATURAL LEFT JOIN `'._DB_PREFIX_.'product_lang` pl
WHERE pl.`id_lang` = '.(int)(Tools::getValue('id_lang')).'
'.Context::getContext()->shop->sqlLang('pl').'
AND p.`id_product` != '.(int)(Tools::getValue('id_product')).'
AND p.`id_product` NOT IN (
SELECT a.`id_product_2`
@@ -342,6 +343,7 @@ if (isset($_GET['ajaxProductPackItems']))
FROM `'._DB_PREFIX_.'product` p
NATURAL LEFT JOIN `'._DB_PREFIX_.'product_lang` pl
WHERE pl.`id_lang` = '.(int)(Tools::getValue('id_lang')).'
'.Context::getContext()->shop->sqlLang('pl').'
AND p.`id_product` NOT IN (SELECT DISTINCT id_product_pack FROM `'._DB_PREFIX_.'pack`)
AND p.`id_product` != '.(int)(Tools::getValue('id_product')));