Re: ALWAYS display first level subcats beneath root cats
Been trying to install this mod again and I am clueless as to why it only displays main and subcategories after the main category is clicked. I edited my /include/categories.php to include this code below, at about line 329 right under the code it mentioned in post #32.
//Subcategories in menu
function func_getallsubcat()
{
$raj =func_get_categories_list("", true, "all");
$raj1=$raj['all_categories'];
$ll=array();
foreach ($raj1 as $k=>$val)
{
if($val['parentid']!="0")
{
$ll[$val['parentid']][]=$val;
}
}
return $ll;
}
$smarty->assign("allsubcategories", func_getallsubcat());
//Subcategorie in menu - end
Then I have tried all of the different categories.tpl, copy and pasting them into my /skin1/customer/categories.tpl file... I have been able to get them to show subcategories only after you click the parent category. I have been trying this for over a week now and I am really stumped and out of ideas... I am also running cdseo and the new skin available in X-cart 4.1.7 which I think was called light something.... I dont think these 2 things would affect the subcategories not displaying on the main page, but maybe I am wrong... Anyone have any ideas what could possibly be wrong and is everyone running this in 4.1.7?
__________________
X-Cart 4.7.3
|