Here's the code.. I guess I was in bad mood or something when I wrote my prev. post...
Code:
{* $Id: product_dropdown_list.tpl,v 1.00 04/29/2003 13:23:08 acidleak Exp $ *}
Browse our Products:
<select name="all_products" onChange="window.top.location.href=this.options[this.selectedIndex].value;">
<option value="">===============></option>
{section name=list loop=$all_products}
<option value="http://www.worldhealthproducts.com/customer/product.php?productid={$all_products[list].productid}">{$all_products[list].product|truncate:25:"...":true}</option>
{/section}
</select>
Put the template included below inside head.tpl as such; change the path accordingly
Code:
<div align="right">{ include file = ../customer/custmods/product_dropdown_list.tpl }</div>
before you'll be able to use the template, you need to build that $all_products array
Code:
# include all copyright info here
# $Id: all_products.php,v 1.24 2002/11/14 07:58:17 acidleak Exp $
#
# Get all products data and store it into $all_products array
#
#
# select from products table
#
$all_products = func_query("select product,productid from $sql_tbl[products] order by $sql_tbl[products].product");
$smarty->assign("all_products",$all_products);
?>
Put the followign line right underheath your "require" calls inside of [b]product.php, products.php, search.php, cart.php [b] changing the path accordingly
Code:
require "./custmods/all_products.php";
Problems? pm me
-acidleak