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

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13168 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vChabot
2012-02-09 09:49:42 +00:00
parent 8714b3253f
commit 241ddaf652
+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;