[-] BO: Root category should be the shop category and not the higher category with multiple root and without multishop #PSCFV-8860

This commit is contained in:
Rémi Gaillard
2013-05-17 17:10:11 +02:00
parent d691e1d403
commit 8b95e9f2ca
+1 -2
View File
@@ -684,8 +684,7 @@ class CategoryCore extends ObjectModel
else
return new Category($shop->getCategory(), $id_lang);
$is_more_than_one_root_category = count(Category::getCategoriesWithoutParent()) > 1;
if ((!Shop::isFeatureActive() && $is_more_than_one_root_category) ||
Shop::isFeatureActive() && $is_more_than_one_root_category && Shop::getContext() != Shop::CONTEXT_SHOP)
if (Shop::isFeatureActive() && $is_more_than_one_root_category && Shop::getContext() != Shop::CONTEXT_SHOP)
$category = Category::getTopCategory($id_lang);
else
$category = new Category($shop->getCategory(), $id_lang);