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}