View Single Post
  #2  
Old 10-25-2004, 09:05 AM
 
pmstudios pmstudios is offline
 

Senior Member
  
Join Date: May 2004
Posts: 133
 

Default

You would have to merge two arrays or create one specifically for manufactures and just use it with the products array. And manufacturers have their own table, so you would need to use the manufactureid from the products table.

Something like this
Code:
foreach ($products as $k => $v) { $manufacturers = func_query("SELECT $sql_tbl[manufacturers].* FROM $sql_tbl[manufacturers]" WHERE manufactureid='".$products[$k]["manufacturerid"]'.""); } $smarty->assign("manufacturers", $manufacturers);

Example of use in products.tpl
Code:
{section name=product loop=$products} {$products[product].product} {if $products[product].manufacturerid eq $manufacturers[product].manufacturerid}owned by {$manufacturers[product].manufacturer}{/if} {/section}

Sorry for the rugged example. This should set you in the right direction at least, if it doesn't work.
__________________
X-Cart 4.0.5
MySQL: 3.23.58
PHP 4.3.2
Reply With Quote