[-] 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:
@@ -172,7 +172,16 @@ class HelperCore
|
|||||||
);
|
);
|
||||||
|
|
||||||
$top_category = Category::getTopCategory();
|
$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);
|
$shop = new Shop($id_shop);
|
||||||
$root_category = Category::getRootCategory(null, $shop);
|
$root_category = Category::getRootCategory(null, $shop);
|
||||||
$disabled_categories[] = $top_category->id;
|
$disabled_categories[] = $top_category->id;
|
||||||
|
|||||||
Reference in New Issue
Block a user