[-] BO : BugFix : #PSFV-462 : category tree view displayed according to he shop context

This commit is contained in:
vChabot
2012-02-09 09:49:42 +00:00
parent 94e668de1f
commit af3ff3ab01
+10 -1
View File
@@ -172,7 +172,16 @@ class HelperCore
);
$top_category = Category::getTopCategory();
$id_shop = Tools::isSubmit('id_shop') ? Tools::getValue('id_shop'): Configuration::get('PS_SHOP_DEFAULT');
if (Tools::isSubmit('id_shop'))
$id_shop = Tools::getValue('id_shop');
else
if (Context::getContext()->shop->id)
$id_shop = Context::getContext()->shop->id;
else
if (!Shop::isFeatureActive())
$id_shop = Configuration::get('PS_SHOP_DEFAULT');
else
$id_shop = 0;
$shop = new Shop($id_shop);
$root_category = Category::getRootCategory(null, $shop);
$disabled_categories[] = $top_category->id;