Quote:
Originally Posted by Victor D
finally find some time and get it( Sorting conditions implemented in x-cart by default is strange a bit so I have added resorting).
Code:
function func_getallsubcat(){
$a =func_get_categories_list(null, true,"all");
$b=$a['all_categories'];
if (!function_exists("sort_cats")){
function sort_cats($a, $b) {return $a["order_by"]> $b["order_by"]; }
}
uasort($b, "sort_cats");
$c=array();
foreach ($b as $k=>$v){
if($v['parentid']!="0")
$c[$v['parentid']][]=$v;
}
return $c;
}
$smarty->assign("allsubcategories", func_getallsubcat());
|
Excellent. Thank you very much.
To help newbies (like me) a little:
the above code goes in "include/categories.php" in the position described in post#13.
at the end of file "skin1/main.css" I added this:
Code:
.menu-categories-list ul li.subcat {
margin-left: 11px;
background: transparent url(images/category_bullet_invert.gif) no-repeat 8px 5px;
}
"margin-left: 11px;" means that I move the subcategories beneath the category 11 pixels to the right. Change the number to move it left or right.
"background: transparent url(images/
category_bullet_invert.gif) no-repeat 8px 5px;" with this line I changed the image (bold letters) in front of subcategories. To put your own image, put your image in folder "images" and change the image name above.
Thanks goes to everyone that helped.
Best regards,
Andrew