Announcement

Collapse
No announcement yet.

Search for all words only

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

    Search for all words only

    At the moment the search facility has the option of searching for 'all' words, or 'any' words.

    How do I take that option out so it just searches for all words?

    I'm guessing it's this bit, but not sure how to remove the options and set the value...

    Code:
    NETQUOTEVAR:SEARCHCOMBINE
                <input type=RADIO name="TB" CHECKED value="A">
                NETQUOTEVAR:SEARCHANDSTRING 
                <input type=RADIO name="TB" value="O">
                NETQUOTEVAR:SEARCHORSTRING&nbsp;NETQUOTEVAR:SEARCHCOMBINEINFO
                <script language="JavaScript">
    				<!--
    				for (nIndex = 0; nIndex < document.forms.length; nIndex++)
    			 	  {
    			 	  if (document.forms[nIndex] && document.forms[nIndex].SS)
    			 	     {
                	   document.forms[nIndex].SS.focus();
    			      }
    			      }
    			   // -->
    			   </script>
    John

    #2
    Hi John

    I'm guessing it's this bit.....
    Bull's eye. All you need to do is replace these lines :

    NETQUOTEVAR:SEARCHCOMBINE
    <input type=RADIO name="TB" CHECKED value="A">
    NETQUOTEVAR:SEARCHANDSTRING
    <input type=RADIO name="TB" value="O">
    NETQUOTEVAR:SEARCHORSTRING&nbsp;NETQUOTEVAR:SEARCHCOMBINEINFO
    ...with this one :

    <input type=HIDDEN name="TB" value="A">

    Save the file and update the site. This should now make search look for ALL the words.
    Krithika Chandrasekar
    SellerDeck

    sigpic

    E-commerce software by SellerDeck

    Comment


      #3
      yup, that fixed it - thanks.
      John

      Comment


        #4
        ah, that's seems to only work on the main search - I've just tried a 'quick search' and it came up with the error -

        "Missing text search join mode. Please specify AND or OR."

        Any ideas?
        John

        Comment


          #5
          Hi John

          Checking this now...
          Krithika Chandrasekar
          SellerDeck

          sigpic

          E-commerce software by SellerDeck

          Comment


            #6
            Hi there

            I re-tested the same workaround on my default store and both Quick and Advanced Search work OK for me. Could you upload your Act_SearchTemplate.html so I can have a look?
            Krithika Chandrasekar
            SellerDeck

            sigpic

            E-commerce software by SellerDeck

            Comment


              #7
              Code:
              <!-- SearchTemplate HTML begin -->
              <!-- Add Search Page header HTML here -->
              
              <input type=HIDDEN name="PAGE" value="SEARCH">
              <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="CUSTOMVAR:ACTSTDWIDTH" ALIGN="CENTER">
                <tr> 
                  <td width="90%" valign=TOP align=LEFT>
              	<span class="actlarge"><BR /><B>Enter Search Text:</b><br /><BR /> </span>
                    </td>
                    <td>&nbsp;</td>
                </tr>
              </table>
              <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="CUSTOMVAR:ACTSTDWIDTH" ALIGN="CENTER">
                <tr><td valign="top" align="center"><img src="down-arrow.gif" width="50" height="34" alt=""><td>
                  <td width="85%" valign="TOP" align="left">
                    <table border=0 cellspacing=0 cellpadding=3 width="95%">
                      <tr> 
                        <td valign="TOP"> <b>NETQUOTEVAR:SEARCHSTRING</b><br>
                          <input type=TEXT name="SS" size=40 maxlength=255>
                          <br>
                     <!--  NETQUOTEVAR:SEARCHCOMBINE
                          <input type=RADIO name="TB" CHECKED value="A">
                          NETQUOTEVAR:SEARCHANDSTRING 
                          <input type=RADIO name="TB" value="O">
                          NETQUOTEVAR:SEARCHORSTRING&nbsp;NETQUOTEVAR:SEARCHCOMBINEINFO -->
              
              <input type=HIDDEN name="TB" value="A">
              
                          <script language="JavaScript">
              				<!--
              				for (nIndex = 0; nIndex < document.forms.length; nIndex++)
              			 	  {
              			 	  if (document.forms[nIndex] && document.forms[nIndex].SS)
              			 	     {
                          	   document.forms[nIndex].SS.focus();
              			      }
              			      }
              			   // -->
              			   </script>
                        </td>
                <!--        <td valign="TOP"> <b>NETQUOTEVAR:PRICERANGELABEL</b><br>
                          NETQUOTEVAR:PRICERANGECONTROL </td> -->
                      </tr>
                      NETQUOTEVAR:SEARCHPROP 
                <!-- <tr><td colspan=2 valign="BOTTOM"> <b>NETQUOTEVAR:SECTIONCONTROLLABEL</b><br>
                          NETQUOTEVAR:SECTIONCONTROL </td></tr>-->
                      <tr> 
                        <td colspan=2 valign="BOTTOM"> 
                          <input type=SUBMIT name=ACTION value="NETQUOTEVAR:SEARCHLABEL">
                        </td>
                      </tr>
                    </table>
              </td>
                </tr>
              <!--  <tr><td valign="TOP">NETQUOTEVAR:SPLASHTEXTBODY NETQUOTEVAR:INFOLINES </td></tr>-->
              </table>
              <!-- Add Search Page footer HTML here -->
              <!-- SearchTemplate HTML end -->
              John

              Comment


                #8
                Hi John

                I replaced the code in my defalut Act_SearchTemplate.html with that pasted in your reply. Search and quick search still work OK for me. I have uploaded the default site, using your search template here

                Please check this and let me know if I am looking in the wrong place.

                P.S: To remove the price and section drop-downs, you can alternatively simply uncheck the options - Allow searching by sections and Allow searching by Price bands in View | Search Settings.
                Krithika Chandrasekar
                SellerDeck

                sigpic

                E-commerce software by SellerDeck

                Comment


                  #9
                  hmm. I backed out the changes to the main search and simple search is still broken, must be another change I made. How does this look?
                  Code:
                  <!-- SIMPLESEARCH HTML BEGIN -->
                  <table cellspacing=0 cellpadding=0 border=0>
                    <form name=simplesearch action="NETQUOTEVAR:SEARCHCGIURL" METHOD="NETQUOTEVAR:CGIMETHOD">
                      <tr> 
                        <td background="nav-bar-background-red.gif" valign=middle noWrap align=left> 
                          <input type="TEXT" name="SS" size="16" maxlength="125" value="NETQUOTEVAR:QUICKSEARCHLABEL" onFocus="this.value='';this.style.background='#FFFFFF'"></td>
                  <td width="10"  bgcolor="0091b4"><img src="nav-bar-background-red.gif" height="26" width="4"></td>
                  <td align="left" valign="top"><input type="image" border="0" name="ACTION" src="crazy-daves-search-button-1.gif" alt="NETQUOTEVAR:QUICKSEARCHBUTTONTEXT" onMouseOver="src='crazy-daves-search-button-2.gif' " onMouseOut="src='crazy-daves-search-button-1.gif' "></td>
                  <td width="10"  bgcolor="0091b4"><img src="nav-bar-background-red.gif" height="26" width="4"></td>
                      </tr>
                    </form>
                  </table>
                  John

                  Comment

                  Working...
                  X