View Single Post
  #11  
Old 03-24-2012, 03:58 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Display manufacturer list on category page

You will need to make an array of the manufacturers unique to that category. Try something like:
In products.php:
Code:
foreach ($products as $k => $v) { $manuf_this_cat[$products[$k]['manufacturerid']] = $manuf_this_cat[$products[$k]['manufacturerid']]+1; } $smarty->assign('manuf_this_cat',$manuf_this_cat);

Then in the template, probably subcategories.php, you can go through that array:
Code:
{if $manuf_this_cat} <hr /> <ul> {foreach from=$manuf_this_cat key=k item=v} <li> manufacturerid:{$k}<br /> number items this cat:{$v}<br /> name: {$manufacturers.$k.manufacturer}<br /> </li> {/foreach} </ul> <hr /> {/if}
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote