Announcement

Collapse
No announcement yet.

original search function restored

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

  • original search function restored

    I was trying to implement a different search function on my site, and in doing so lost the 3dCart search function.

    I think the code is still there:

    <!--START: quicksearch-->
    <script type="text/javascript" src="assets/templates/common/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="assets/templates/common/quicksearch/jquery.quicksearch.js"></script>
    <link rel="stylesheet" href="assets/templates/common/quicksearch/quicksearch.css">
    <script type="text/javascript">
    jQuery(function() {
    jQuery('#searchlight').searchlight('/search_quick.asp');
    });
    </script>
    <!--END: quicksearch-->


    But the search box is gone from my site. Can someone help me put it back and make it work again?

  • #2
    You also need the following (Place it carefully where the search box should be, you may need <td>..<tr>.. etc. surrounding the code:

    Code:
                                        <!--START: FRAME_SEARCH-->
                                        <table cellspacing="0" cellpadding="4" border="0">
                                          <form name="searchForm" method="get" action="search.asp" style="margin: 0px; padding: 0px;">
                                            <tr>
                                              <td><input name="keyword" id="searchlight" type="text" class="txtBoxStyle" onFocus="javascript:if (document.searchForm.keyword.value=='enter keywords click GO') {document.searchForm.keyword.value='';};"  onblur="if(this.value.length == 0) this.value = 'enter keywords click GO'" value="enter keywords click GO" size="35" style="height: 17px; padding: 3px 0px 0px 3px;"></td>
                                              <td><input  type="image" src="assets/templates/[template]/images/go_btn.gif" name="search" value="GO"></td>
                                            </tr>
                                          </form>
                                        </table>
                                        <!--END: FRAME_SEARCH-->
    Elegant Weddings +
    www.elegantweddingsplus.ca
    www.elegantweddingsplus.com

    Comment


    • #3
      Thanks - should this replace what I have, or should this be in addition to what is already there?

      Comment


      • #4
        It's in addition. The code you posted at the top was a javascript to add the quicksearch. The code that Elegant posted controls the display of the box itself.

        You may want to look at a fresh copy of a frame.html file from a template to see how it should be.

        Comment


        • #5
          that helped thank you! now it is functioning, but it's not giving me any results.

          Your search for "donek" returned the following results...


          Search Results (1 Matches found )


          nothing else showed. It should have given me much more than 1 result, as this is a popular item on our site.

          any suggestions on what to look for next?

          Comment


          • #6
            What's your site URL?

            Comment


            • #7
              Welcome to Bomber Industries -

              Comment


              • #8
                I've been working in the "frame" template that is specific to our site. However, there is another template called "search". Should I look at that one too? Maybe it holds the key......

                Comment


                • #9
                  the search template file controls how search results are displayed on the results page. It shouldn't be the problem here.

                  I am not sure exactly whats going on. If you type "donek" in the box and let it sit there the quicksearch will show at least three results, but clicking submit will show no results but say the "1 Result" message.

                  I think you might have some of your code set up for quicksearch and some of it set up for regular search. I would try reverting to an untouched frame.html, making sure it works, and then copying the relevant code from there to your modified frame.

                  Comment


                  • #10
                    hmmmm the problem is we've done so many changes to that template that if I click on "restore original" I will lose all of my other changes. So i don't have an original one to look at.

                    If anyone has the original they can send to me, that would be awesome!

                    Thank you so much for all your help cbsteven and ElegantWeddings!

                    Comment


                    • #11
                      I recommend you become familiar with accessing the templates via FTP, rather than the web interface. That way you can make backup copies easily and see an original of any template at any time.

                      Here is a little info from 3DCart support:
                      https://support.3dcart.com/3dcart2/K...ow-do-i-use-it

                      also:

                      A good generic FTP tutorial

                      Comment


                      • #12
                        I can use Filezilla, but I don't see frame.html in the common templates which is where the articles say that the original versions are.

                        Comment


                        • #13
                          It will be in web/assets/templates/[name of the template you use such as v30001]/frame.html

                          Comment


                          • #14
                            Right, but that is the one I have changed. The original one is not there, and the article you referenced earlier says that all of the originals are in the common templates folder. However, there is no frame.html in the common templates folder.

                            The only frame.html that I can see is in the bomber2 templates folder, which is the one that has been modified.

                            I really appreciate you trying to help me! Thank you!

                            Comment


                            • #15
                              Ahh. I would generally recommend making a copy of a template before editing it just for this reason. I made a copy of vXXXX and renamed it My_Template and use that.

                              If you let me know which template number you use I can put up a copy of the frame.

                              Comment

                              Working...
                              X