[-] BO: Fix various bugs in categories ntree generation
This commit is contained in:
@@ -196,7 +196,7 @@ class AdminShopControllerCore extends AdminController
|
||||
{
|
||||
$root_category = new Category((int)Tools::getValue('id_category'));
|
||||
$root_category = array(
|
||||
'id_category' => $root_category->id_category,
|
||||
'id_category' => $root_category->id,
|
||||
'name' => $root_category->name[$this->context->language->id]
|
||||
);
|
||||
$selected_cat = array($root_category['id_category']);
|
||||
@@ -629,7 +629,7 @@ class AdminShopControllerCore extends AdminController
|
||||
$selected_cat[] = $root_categories[0]['id_category'];
|
||||
|
||||
foreach ($children as $child)
|
||||
$selected_cat[] = $child->id_category;
|
||||
$selected_cat[] = $child->id;
|
||||
}
|
||||
if (Shop::getContext() == Shop::CONTEXT_SHOP && Tools::isSubmit('id_shop'))
|
||||
$root_category = new Category($shop->id_category);
|
||||
|
||||
Reference in New Issue
Block a user