Bear with me. I'm somewhat new to php and MySQL.
On my website I have a manufacturer dropdown that has a dynamic search. It uses Chosen for its submit.
Here is the .tpl code for the form:
{
$Id: menu_manufacturers.tpl,v 1.1.2.2 2010/12/09 14:00:53 aim Exp $
vim: set ts=2 sw=2 sts=2 et:
}
<script type="text/javascript" src="include/chosen.jquery.min.js">
</script>
{capture name=menu}
<form method="get" action="manufacturers.php">
<select name="manufacturerid" onchange="this.form.submit()" class="chzn-select-manuf" style="width:100%" >
<option value="0"{if $manufacturerid eq "0"} selected{/if}>{$lng.lbl_manufacturers}...</option>
{section name=mid loop=$manufacturers_menu }
<option value="{$manufacturers_menu[mid].manufacturerid}"{if $manufacturerid eq $manufacturers_menu[mid].manufacturerid} selected{/if}>{$manufacturers_menu[mid].manufacturer}</option>
{/section}
{if $show_other_manufacturers}
<option value="0"{if $manufacturerid eq "0"} selected{/if}>{$lng.lbl_other_manufacturers}</option>
{else}
<option value="0"{if $manufacturerid eq "0"} selected{/if}>{$lng.lbl_all} {$lng.lbl_manufacturers}...</option>
{/if}
</select>
</form>
{/capture}
{include file="customer/menu_dialog.tpl" title=$lng.lbl_manufacturers content=$smarty.capture.menu additional_class="menu-manufacturers"}
The manuafcturers table has these fields:
ManufacturerID, Manufacturer, avail, artist_only.
Right now, the form only populates with those manufacturers where avail="Y" (its a Y or N field). I need it to populate only those manufacturers where avail="Y' AND artist_only="Y" (another Y or N field). It populates from a .php file that gets the manufacturer list to use in the loop. However, that .php file is encrypted so I can't see the database query it uses. So I need to make my own .php file with my own query.
That query is the part that I can't figure out. I also don't really understand the line of code:
<select name="manufacturerid" onchange="this.form.submit()" class="chzn-select-manuf" style="width:100%" >
or what it does.
Any help?
If you'd like to see the dropdown it's here:
www.inkedboutique.com/home.php?shopkey=123
Click on a product and then you'll see the Brands dropdown on the left.