Here is decision, tested on 4.1.9 and 4.1.11:
find this code in include/categories.php
Code:
#
# Gather the array of categories and extract into separated arrays:
# $all_categories, $categories and $subcategories
#
if (($current_area == "C" && defined("GET_ALL_CATEGORIES")) || defined('MANAGE_CATEGORIES')) {
$_categories = func_get_categories_list($cat);
} elseif($current_area == "C") {
$_categories = func_get_categories_list($cat, true, "current");
} else {
$_categories = func_get_categories_list($cat, true, "all");
}
between comments and
Code:
if (($current_area == "C" && defined("GET_ALL_CATEGORIES"))
insert
Code:
$old_cat = $cat;
if ($current_category["parentid"] != 0)
$cat = $current_category["parentid"];
and find
Code:
if ($cat == 0)
$subcategories = $categories;
and insert after
You should get something like this
Code:
#
# Gather the array of categories and extract into separated arrays:
# $all_categories, $categories and $subcategories
#
$old_cat = $cat;
if ($current_category["parentid"] != 0)
$cat = $current_category["parentid"];
if (($current_area == "C" && defined("GET_ALL_CATEGORIES")) || defined('MANAGE_CATEGORIES')) {
$_categories = func_get_categories_list($cat);
} elseif($current_area == "C") {
$_categories = func_get_categories_list($cat, true, "current");
} else {
$_categories = func_get_categories_list($cat, true, "all");
}
extract($_categories);
unset($_categories);
#
# Prepare data for FancyCategories module
#
if ($current_area == "C" && !empty($active_modules["Fancy_Categories"]))
@include $xcart_dir."/modules/Fancy_Categories/fancy_categories.php";
if (!empty($all_categories))
$smarty->assign("allcategories", $all_categories);
if (!empty($categories))
$smarty->assign("categories", $categories);
if ($cat == 0)
$subcategories = $categories;
$cat = $old_cat;
All done. Just save it and upload file on server.
You will always see subcategories menu (if subcategories exist) in any root category.