link->res('app/tpl/main/default/media/arrow-white-right.png'); print '
+ '.$C->xml('cpx_title_img_alt').'

View All

'.$C->xml('cpx_title_link').'
'.($C->prod_count>=1?''.$C->prod_count.' Products':'').'
'; if($C->has('items')){ $sc=count($C->items); if($sc){ $i=0; $c=0; //Again we had to pull the whole tree, so ignore anything beyond what we want to display foreach($C->items as $Q){ $i++; if($i<=5){ if($c>=3){ print '
'; $c=1; }else{ $c++; } //print ''.$Q->xml('cpx_title_link').''; print ''; } } } if($sc>5){ print ''; } // } print '
View All Products '.($C->prod_count>=1?''.$C->prod_count.' Product'.($C->prod_count>1?'s':'').'':'').'
'; } //Product Master Category, end of the line as far as links go function render_category_master($C,$func,$mod){ //Common right arrow image url $arrow_right = $func->link->res('app/tpl/main/default/media/arrow-white-right.png'); print '
+ '.$C->xml('cpx_title_img_alt').'

VIEW PRODUCT

'.$C->xml('cpx_title_link').'
From '.GBP.$C->cat_stats_net_min.'

'.$C->xmlnl('cat_short_desc').'

View Product '.$C->prod_count.' Variation'.($C->prod_count>1?'s':'').' available
'; } ?>
Flat Handle Carrier Bags

xml('cp_title')?>

xmlnl('cat_short_desc')?>

shop->cat->get_custom_map('cmap_page='.$cat->cp_ref,false,1); if($CM->ok){ //Map found, display in tree order by default. 2 levels only $Q=$mod->shop->cat->get_category_sitemap($CM->cmap_left+1,$CM->cmap_right,'pm.cmap_depth<='.( $CM->cmap_depth+2 )); if($Q->ok){ //Common right arrow image url $arrow_right = $func->link->res('app/tpl/main/default/media/arrow-white-right.png'); //Need to cache the whole tree, so we can parse children in to parent cells $cats = array(); while($Q->nav()){ if($Q->cmap_depth == $CM->cmap_depth+1){ //First level subcat inside the one being viewed $cats[$Q->cp_ref]=$Q->row_data; $cats[$Q->cp_ref]->img = $Q->main_image('S300'); $cats[$Q->cp_ref]->link = $Q->link()->str(); $cats[$Q->cp_ref]->items=array();//Subcats }else{ //Second level subcat inside the one being viewed, add to parent items arr if(isset($cats[$Q->cmap_parent_page])){ $cats[$Q->cmap_parent_page]->items[$Q->cp_ref]=$Q->row_data; $cats[$Q->cmap_parent_page]->items[$Q->cp_ref]->link = $Q->link()->str(); } } }//while //Display $colCount=0; foreach($cats as $C){ if($colCount==3){ print '
'; $colCount=1; }else{ $colCount++; } print '
'; if($C->cp_template_cms==12){ render_category_master($C,$func,$mod); }else{ render_category($C,$func,$mod); } print '
'; }//display loop }//subcats present }//map loop ?>