// Fix all product_lang sql restrictions with multishop

This commit is contained in:
rMalie
2011-08-19 14:01:23 +00:00
parent e3f21b76e6
commit fb55cfcd11
26 changed files with 146 additions and 141 deletions
@@ -165,7 +165,7 @@ class StatsBestProducts extends ModuleGrid
) AS totalPageViewed
FROM '._DB_PREFIX_.'product p
'.$this->context->shop->sqlAsso('product', 'p').'
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product AND pl.id_lang = '.(int)($this->getLang()).')
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product AND pl.id_lang = '.(int)$this->getLang().$this->context->shop->sqlLang('pl').')
LEFT JOIN '._DB_PREFIX_.'order_detail od ON od.product_id = p.id_product
LEFT JOIN '._DB_PREFIX_.'orders o ON od.id_order = o.id_order
WHERE p.active = 1