Announcement

Collapse
No announcement yet.

using extended info for search terms - adding a drop down list

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    using extended info for search terms - adding a drop down list

    Dear All

    Sorry for the long title, I wanted to make my query clear(ish)

    I read some old posts on search functionality, and it was suggested to use the extended info field in V6 to add additional search terms to products.

    My shop is set out in sections by category, e.g. aromatherapy products, incense products, music, books etc.: http://www.theholisticshop.com/.

    I want to add a drop down list to the front page inviting customers to search by holistic therapy, or by what they want to do, e.g. relaxation, meditation, reflexology, unwind etc. I added some of these specific terms to the extended info fields, and the right products were returned when I ran a normal search; so far so good!

    What I can't get my head round is how to join a normal javascript <option>value</option> drop down list with these values to the search function.

    This site: http://www.toys-express.co.uk has been mentioned in this respect before, as it has implemented something very similar on its front page, searching by toy brand.

    Any tips or advice on how to create a smiliar drop down list that feeds into the product search would be gratefulyy received as I can't figure out the logic even by studying the source code of the above site.

    Thanks in advance, Margaret
    http://www.theholisticshop.com

    Gifts and products for the wellbeing of mind body and soul

    #2
    OK, I think I've answered my own question - I found the section in the Advanced Guide on creating additional customsearch.fil files, and I'm giving it a go now.......

    Thanks, Margaret
    http://www.theholisticshop.com

    Gifts and products for the wellbeing of mind body and soul

    Comment


      #3
      Here's what the Simple Search box looks like on a live page
      Code:
      <table cellspacing=0 cellpadding=0 border=0 align=center>
        <form name=simplesearch action="http://inferno/cgi-bin/ss000766.pl" METHOD="GET">
         <tr> 
          <td valign=middle noWrap align=left>
           <input type="TEXT" name="SS" size="15" maxsize="125" value="Quick search" onFocus="this.value='';this.style.background='#FFFFFF'"> &nbsp; 
          </td>
          <td valign=bottom noWrap align=left>
           <input type="image" border="0" name="ACTION" src="quicksearch.gif" alt="Go!">
           <input TYPE=HIDDEN NAME="PR" VALUE="-1">
           <input TYPE=HIDDEN NAME="TB" VALUE="A">
           <input TYPE=HIDDEN NAME="SHOP" VALUE="">
          </td>
         </tr>
        </form>
      </table>
      Now all that's needed to make it a custom drop-down list containing your own set of search terms is to use the above code but replace the single line
      Code:
      <input type="TEXT" name="SS" size="15" maxsize="125" value="Quick search" onFocus="this.value='';this.style.background='#FFFFFF'"> &nbsp;
      with this lump
      Code:
      <select name="SS">
       <option value="Aromatherapy">Aromatherapy</option>
       <option value="Yoga">Yoga</option>
       <option value="Herbal">Herbal</option>
      </select>
      And tweak the value="..." bits to be those that you want passed to the Search, adding in as many <option..> ... </option> as you need.

      You'll also have to change

      action="http://inferno/cgi-bin/ss000766.pl"

      to suit the searchscript location on your live site
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Norman,

        Thank you, as always you are a star, and I can't thank you enough, for this and many other tweaks of yours that I've implemented.

        Please have a look around our site and choose some incense or something for yourself - please email me at margaret@theholisticshop.com when you've chosen!
        http://www.theholisticshop.com

        Gifts and products for the wellbeing of mind body and soul

        Comment

        Working...
        X