// Fix admin controller
This commit is contained in:
1 parent
99d7f3e3b8
commit
f7b593d9d0
1 file changed
+2
-5
@@ -1670,6 +1670,8 @@ class AdminControllerCore extends Controller
|
|||||||
}
|
}
|
||||||
elseif (!Shop::isFeatureActive())
|
elseif (!Shop::isFeatureActive())
|
||||||
$this->context->cookie->shopContext = 's-'.Configuration::get('PS_SHOP_DEFAULT');
|
$this->context->cookie->shopContext = 's-'.Configuration::get('PS_SHOP_DEFAULT');
|
||||||
|
else if (Shop::getTotalShops(false, null) < 2)
|
||||||
|
$this->context->cookie->shopContext = 's-'.$this->context->employee->getDefaultShopID();
|
||||||
|
|
||||||
$shop_id = '';
|
$shop_id = '';
|
||||||
Shop::setContext(Shop::CONTEXT_ALL);
|
Shop::setContext(Shop::CONTEXT_ALL);
|
||||||
@@ -1700,11 +1702,6 @@ class AdminControllerCore extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Shop::getTotalShops(false, null) < 2)
|
|
||||||
{
|
|
||||||
$shop_id = $this->context->employee->getDefaultShopID();
|
|
||||||
Shop::setContext(Shop::CONTEXT_SHOP, $shop_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check multishop context and set right context if need
|
// Check multishop context and set right context if need
|
||||||
if (!($this->multishop_context & Shop::getContext()))
|
if (!($this->multishop_context & Shop::getContext()))
|
||||||
|
|||||||
Reference in new issue
Block a user