View Single Post
  #48  
Old 07-20-2005, 12:55 PM
  HWT's Avatar 
HWT HWT is offline
 

eXpert
  
Join Date: Jan 2005
Location: Massachusetts, USA
Posts: 392
 

Default

This also works like a charm for the search (thanks everyone who's posted) - this is an extension of Carrie's solution

in include/search.php

just before:

Code:
$smarty->assign("products",$products);

include:

Code:
if($products) { foreach($products as $key=> $product) $products[$key]["manufacturer"]= func_query_first_cell("select manufacturer from $sql_tbl[manufacturers] where manufacturerid=".$product["manufacturerid"]); }

To get the manufacturer's name to hyperlink, simply use:

Code:
<a href="manufacturers.php/?manufacturerid={$products[product].manufacturerid}">{$products[product].manufacturer}</a>

instead of:

Code:
{$products[product].manufacturer}

where you would like it to show up in skin1/customer/main/products_t.tpl or skin1/customer/main/products.tpl
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10
Reply With Quote