View Single Post
  #5  
Old 10-25-2004, 12:29 PM
  jds580s's Avatar 
jds580s jds580s is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 38
 

Default

OK, I've almost got this working, it will correctly display the manufactures name of the first product in a catagory, but none of the subsiquent one.

for anyone else who references this I modified at least one or two things here in products.php
Code:
foreach ($products as $k => $v) { $manufactureid=$products[$k]["manufacturerid"]; $manufacturers = func_query ("SELECT $sql_tbl[manufacturers].* FROM $sql_tbl[manufacturers] WHERE manufacturerid='".$products[$k]["manufacturerid"]."'"); } $smarty->assign("manufacturers", $manufacturers);

and simplified the products_t.tpl code for my needs
Code:
{if $products[product].manufacturerid ne "0"}{$manufacturers[product].manufacturer}{/if}

Any ideas on why products after the first don't display?
The conditional statement in the .tpl file is correct, when I put some text in there it is "true" for all the products that have a manufacture set, it's just the $manufacturers[product].manufacturer that is only working on the first product.

Thanks!
__________________
animator for hire
onthez.com
------------------------
x-cart v4.0.5 Linux
_________________
Reply With Quote