View Single Post
  #16  
Old 03-31-2009, 04:07 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Subcategory Mods on 4.2.0

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());
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote