View Single Post
  #3  
Old 10-26-2004, 03:13 PM
 
pmstudios pmstudios is offline
 

Senior Member
  
Join Date: May 2004
Posts: 133
 

Default

Hey jds580s,

To do what you're describing now changes the previous stuff (actually a bit simpler).

Just replace the previous code in products.php with
Code:
# # Create manufacturers array # $query = func_query("SELECT manufacturerid, manufacturer FROM $sql_tbl[manufacturers]"); $smarty->assign("manufacturers", $manufacturers);

Then in your template you'll do something like this
Code:
{section name=id loop=$manufacturers} {$manufacturers[id].manufacturer} {section name=product loop=$products} {if $products[product].manufacturerid eq $manufacturers[id].manufacturerid} {$products[product].product} {/if} {/section} {/section}

Hope this helps....
__________________
X-Cart 4.0.5
MySQL: 3.23.58
PHP 4.3.2
Reply With Quote