Announcement

Collapse
No announcement yet.

including a custom variable with the quick search

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

    including a custom variable with the quick search

    I've introduced a searchable custom property for "item size" throughout my site so it can be used to filter the search (see here budget-bumps.co.uk/acatalog/search.html )

    Is there a way I can alter my quick search to offer this dropdown as well?
    I've had a search (honest guv) and not found anything and my trial and error was unsuccessful.

    Basically I just want a condensed version of the main search as a quick search (ie in my LHS column)
    Is this possible?

    Any pointers would be great, thanks
    Tracey

    #2
    Is it possible to take the variables from the search page and create a new search box, ideally replacing the quick search

    Just a thought, and it sounded easy

    D

    Comment


      #3
      I kinda tried that...or, at least, I dabbled with it

      Ok..maybe I'll give it another go..it's not like I haven't taken about 6 snapshots already this evening LOL
      Tracey

      Comment


        #4
        Tracey,

        Give this a try, just quickly amended from our site with the <div>'s etc removed so might need a bit of adjustment but should work. Replace your quick search layout with:-

        Code:
        <!-- Open Search Form -->
        <form id="simplesearch" method="get" action="<actinic:variable name="OnlineScriptURL" value="Search Script URL" />">
        <!-- Open First Search Box` -->
        <select size="1" name="S_ItemSize0_0"><option value=""> Any</option><option value="04"> 04</option><option value="06"> 06</option><option value="08"> 08</option><option value="10" selected="selected"> 10</option><option value="12"> 12</option><option value="14"> 14</option><option value="16"> 16</option><option value="18"> 18</option><option value="20"> 20</option><option value="22"> 22</option><option value="24"> 24</option></select>
        <!-- Close First Search Box -->
        <!-- Open Second Search Box -->
        <input name="SS" style="width: 145px;" value=" Enter Keywords" onfocus="this.value='';" type="text" />
        <!-- Close Second Search Box -->
        <!-- Open Hidden Search Tags and Search Button -->
        <input name="page" value="search" type="hidden" />
        <input name="TB" value="A" type="hidden" />
        <input name="RANDOM" value="NETQUOTEVAR:RANDOM" type="hidden" />
        <input value="ACTION" name="search" src="button_search_button.gif" alt="Search Our Site Now!" type="image" />
        <input name="PR" value="-1" type="hidden" />
        <!-- Close Hidden Search Tags and Search Button-->
        <!-- Open Advanced Search Text -->
        <br />
        <a href="search.html" title="Advanced Search">Advanced Search &raquo;</a>
        <!-- Close Advanced Search Text -->
        </form>
        <!-- Close Search Form -->
        Cheers

        David
        Located in Edinburgh UK

        http://twitter.com/mcfinster

        Comment


          #5
          This should work, nice one Dave.

          Regards,
          Bruce King
          SellerDeck

          Comment


            #6
            Thanks David

            I'd actually managed to do it but I'm going to take a good look at yours too, if that's ok, and might make a kind of frankenstein version

            Many thanks
            Tracey

            Comment


              #7
              Help yourself, that's what it's there for!
              Cheers

              David
              Located in Edinburgh UK

              http://twitter.com/mcfinster

              Comment


                #8
                thanks again

                Your code helped me to strip a few bits out of mine.
                I now have 2 new layouts..one in use called "Quick search with size" and one called "Davids Quick Search"

                Much appreciated
                Tracey

                Comment


                  #9
                  An honour indeed! Glad it's working!
                  Cheers

                  David
                  Located in Edinburgh UK

                  http://twitter.com/mcfinster

                  Comment


                    #10
                    hmmmm...it's working fine, yes..
                    well, it's working as good as my main search anyway...which, now that I'm testing it, is giving me problems..


                    ok..I need to make my filter optional because some items (lingerie, for example) don't have a the size property entered.

                    If I select "and" in the searchable properties..it only searches from items WITH the property filled out
                    If I select "or"...then it brings results for the wrong sizes by effectively ignoring the size "filter"

                    I need to to search as "and" if a size is entered...but to ignore the searchable properties box (which has N/A as a default setting (changed in design>text from "any")) if no size is chosen

                    Question...am I asking too much here?
                    I have the searchable properties box marked as optional in the settings..but this it only making it optional to choose a size..the alternative being Actinic chooses from all the sizes...but not products with no size entered in them

                    Maybe I need a dummy entry for these products...
                    oooh...such as N/A....thinking out loud..

                    bbiab..gonna try it!
                    Tracey

                    Comment


                      #11
                      oooh..fabby
                      ok..went through and entered N/A for all non-sized items.(set at section level so didn't take too long)

                      Turned OFF "optional" in the searchable properties settings and selected N/A as the default

                      I had problems with this because it wouldn't stick with using N/A as default. It kept jumping to 04 which is top of my list so I dug into the code and added <option value="N/A" selected="selected"> into it

                      Hey presto...working properly now...searching the whole catalogue again.
                      Not sure why it wouldn't default to my N/A setting (I'd click "apply" and "ok" but then when it went back to the design tab or offline preview, it'd be back on 04 again)
                      Still, it worked adding it into the code anyway so it's all good

                      thanks for listening and goodnight (well...soon LOL)
                      Tracey

                      Comment


                        #12
                        Nice one T, looks good on the site aswell, not that i know what im looking for on a maternity site you understand

                        I think next week is a week of getting my head down, i've pick up so much lately and my book marks are getting a bit full, so maybe time to implement them, Nice one Dave, perhaps i will have to follow tracy's example and name mine Dave's search box

                        Cheers
                        D

                        Comment

                        Working...
                        X