X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   2 Dropdown menus, 1 search (https://forum.x-cart.com/showthread.php?t=58706)

vitalaccessories 03-31-2011 01:02 PM

2 Dropdown menus, 1 search
 
Hi all,

Using the assistance of kind members of this forum, I have made a simple search dropdown menu for my site which essentially searches for any option selected in that dropdown.

I am looking to further implement a second dropdown running alongside this that will show only categories. So in essence, one has the option to drill down to a specific type of item quickly within a certain category.

What would I need to add to achieve this within xcart (search 1 dropdown + search 2 dropdown = search result) ?

Thank you.

vitalaccessories 04-04-2011 02:22 PM

Re: 2 Dropdown menus, 1 search
 
Anyone have any ideas on how to implement this please? I have tried generic forms found using google but can't get them to work in xcart... The code I have up to now inserts a dropdown box and submits a search when a particular option is selected. I would like it that 2 selections are made from seperate dropdown menus and the search is made based on the selections made (selection 1 + selection 2). Thanks.

Code:

{*
$Id: search.tpl,v 1.1 2010/05/21 08:32:02 joy Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
<div class="search">
  <div class="valign-middle">
    <form method="post" action="search.php" name="productsearchform">

      <input type="hidden" name="simple_search" value="Y" />
      <input type="hidden" name="mode" value="search" />
      <input type="hidden" name="posted_data[by_title]" value="Y" />
      <input type="hidden" name="posted_data[by_descr]" value="Y" />
      <input type="hidden" name="posted_data[by_sku]" value="Y" />
      <input type="hidden" name="posted_data[search_in_subcategories]" value="Y" />
      <input type="hidden" name="posted_data[including]" value="all" />

      {strip}
 
  <select name="posted_data[substring]" onchange='this.form.submit()' class="{if not $search_prefilled.substring}black-text{/if}" value="{$search_prefilled.substring|default:$lng.lbl_search|escape}" />
<option>selection 1</option>
<option>selection 2</option>
<option>selection 3</option>

        {include file="customer/buttons/button2.tpl" type="input" style="image"}
      {/strip}

    </form>

  </div>
</div>
<br>



All times are GMT -8. The time now is 09:00 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.