OK I got the drop downs to generate finally and now I have a simple question that I cannot find the answer too.
IF I put the select tags on the advanced_search.tpl they generate fine. If I put the same tags on my custom specific_search.tpl they do not generate. It is using the same form tag so it should be calling to the same php file right? What I am guessing is there is a file somewhere that I did not active the tpl or maybe php file.
Here is my customer/specific_search.php:
Code:
<?php
#
# $Id: search.php,v 1.50 2003/11/12 14:42:07 svowl Exp $
#
#
# BRAND query
#
$brand_query = "SELECT distinct brand FROM $sql_tbl[products] WHERE forsale='Y' ORDER BY brand";
#
# model query
#
$model_query = "SELECT distinct b_model FROM $sql_tbl[products] WHERE forsale='Y' ORDER BY b_model";
// assign query to smarty.
$brand = func_query($brand_query);
$model = func_query($model_query);
$smarty->assign("brand",$brand);
$smarty->assign("model",$model);
$smarty->assign("main","specific_search");
$smarty->display("customer/home.tpl");
?>
Here is my skin1/customer/main/specific_search.tpl:
Code:
{* $Id: specfic_search.tpl,v 1.19 2003/04/15 06:23:26 svowl Exp $ *}
<table width="100%" border="0" cellspacing="2">
<form action="specific_search.php" name="specificsearch">
<tr valign="top">
<td height="40" colspan="6" align="left" valign="middle"><font class="CategoriesList" color="#FF6600">Specific
Search:</font>
<hr size=1 noshade width="100%" align="left"></td>
</tr>
<tr>
<td width="12" height="45" valign="top"></td>
<td width="212" align="center" valign="top" ><font class="SectionBody">Make:</font>
<select onChange="javascript:document.specificsearch.submit()" name="brand">
<option value="">All</option>
{section name="brand" loop=$brand}
<option value="{ $brand[brand].brand }">{ $brand[brand].brand|escape }</option>
{/section}
</select>
</td>
<td width="123" align="center" valign="top" > <font class="SectionBody">Model:</font>
<select onChange="javascript:document.specificsearch.submit()" name="brand">
<option value="">All</option>
{section name="brand" loop=$brand}
<option value="{ $brand[brand].brand }">{ $brand[brand].brand|escape }</option>
{/section}
</select> </td>
<td width="93" align="center" valign="top" > <font class="SectionBody">Year:</font>
<select onChange="javascript:document.specificsearch.submit()" name="brand">
<option value="">All</option>
{section name="brand" loop=$brand}
<option value="{ $brand[brand].brand }">{ $brand[brand].brand|escape }</option>
{/section}
</select> </td>
<td width="88" valign="top"></td>
<td width="342" valign="center"><a href="javascript:specificsearch.submit()">{include
file="buttons/search.tpl" style="button" type="input"}</a></td>
</tr>
</form>
<tr>
<td height="21" colspan="6" valign="top"><hr size=1 noshade></td>
<tr>
<td height="2"></td>
<td ></td>
<td ></td>
<td ></td>
<td></td>
<td></td>
</table>
I think its a matter of linking the tpl to the php but I cannot see the problem.
Also I did name specific_search.tpl in the home_main.tpl.
Like I said I know the code works but I think the linking is bad and I cannot find where.