[*] BO : categories multishop improved

This commit is contained in:
vChabot
2012-01-19 14:03:33 +00:00
parent 9d41358764
commit 585b670df3
15 changed files with 163 additions and 92 deletions
+4 -1
View File
@@ -973,7 +973,9 @@ class ToolsCore
if ($categoryType === 'products')
{
$interval = Category::getInterval($id_category);
$intervalRoot = Category::getInterval($context->shop->getCategory());
$id_root_category = $context->shop->getCategory();
$root_category = new Category($id_root_category);
$intervalRoot = Category::getInterval($id_root_category);
if ($interval)
{
$sql = 'SELECT c.id_category, cl.name, cl.link_rewrite
@@ -985,6 +987,7 @@ class ToolsCore
AND c.nright <= '.$intervalRoot['nright'].'
AND cl.id_lang = '.(int)$context->language->id.'
AND c.active = 1
AND c.level_depth > '.(int)$root_category->level_depth.'
ORDER BY c.level_depth ASC';
$categories = Db::getInstance()->executeS($sql);