View Single Post
  #8  
Old 10-25-2004, 02:08 PM
 
pmstudios pmstudios is offline
 

Senior Member
  
Join Date: May 2004
Posts: 133
 

Default

Ok, I just checked the method I use since I'm actually doing something similar - not with manufacturers but the idea is exactly same. Do away with everything else and try this...

Make a new function in func.php
Code:
function func_get_manufacturers($manufacturerid) { global $sql_tbl; return func_query("SELECT $sql_tbl[manufacturers].* FROM $sql_tbl[manufacturers] WHERE manufacturerid='$manufacturerid'"); }

In products.php
Code:
if ($products) { foreach ($products as $k => $v) $manufacturers[] = func_get_manufacturers($v["manufacturerid"]); } $smarty->assign("manufacturers", $manufacturers);

In products.tpl just use
Code:
{$manufacturers[product].manufacturer}


That should work. If not, I'll resign and bake donuts from now on
__________________
X-Cart 4.0.5
MySQL: 3.23.58
PHP 4.3.2
Reply With Quote