Announcement

Collapse
No announcement yet.

You searched for .......

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

    You searched for .......

    hi, has anyone come across a solution to show what a user has searched for in the search results...ie:

    You searched for: Blue widgets

    Results 1 to 34

    ....
    ....
    ....

    So somehow I suppose it would have grab the search term from the url string.

    TIA
    Web design Bradford

    #2
    Hey there, You can do this, its hidden away in the scripts, have a look at the following kb article

    Its pretty easy
    Last edited by KB2; 23-Mar-2010, 08:48 AM. Reason: Updating kb links

    Comment


      #3
      thanks for the answer, but then how would you get the necessary part of that log file to show on the page results?
      Web design Bradford

      Comment


        #4
        Nadeems reply will show you the site owner whay people are searching for on your site, this is useful as it indicates what you could be stocking.

        however don't think this is what you asked for as i think you want to tell people what they last looked at, like amazon does.

        Comment


          #5
          Correct...also a add to the wishlist would be Actinic looking at this search term list and generating a popular searches list (cloud) box to go alongside the current marketing options.
          Web design Bradford

          Comment


            #6
            Finding a solution to this issue would be very useful.

            I have enabled the search log and I am seeing lots of spelling mistakes made by customers who then receive no results due to their mistake. If the customer can see what they have searched for then hopefully they would see the mistake and correct it.
            Jonathan

            Comment


              #7
              if you are using SPP you could add mis- spellings to the bottom of the product layout ie add a variable and show it under all the useful gubbins, out of the way but still on the page , this might help search results

              Comment


                #8
                OK. Here are the modifictions to the search script to do this.

                This took quite a bit of effort to work out so is offered on a donationware basis. If you use it then please contact me via the forum and donate something for my effort (or send something via paypal if you prefer).

                Here's what to do:

                Open SearchScript.pl (in the site1 folder) in an HTML editor and make these four changes:

                1. Create a new search echo variable by adding these lines of code near the top where the other variables are defined. I did this on line 48.

                # Global Variable

                my $SearchEchoText="";
                2. Create a search echo string by inserting the line in red into this bit of code. (Look around line 570 in V9).

                # Now do the text search.
                #
                ($status, $sError) = Search::SearchText($sPath, \$sSearchValue, $bText, $pTextHits);
                if ($status != $::SUCCESS)
                {
                SearchError($sError);
                exit;
                }
                $SearchEchoText = "You searched for: '" . $sSearchValue . "' <br/><br/>";
                You can change the text used if you want it to say something different.

                3. Add the search echo string to the 'no results' string by inserting the new variable as shown in red. (around line 1250 in V9). Don't forget the . after the variable to join the strings together.

                # Check for the "no matches" case
                #
                if ($#Results == -1)
                {
                return ($::NOTFOUND, $SearchEchoText . ACTINIC::GetPhrase(-1, 267));
                }
                #
                4. Add the search echo string to the 'results' string by inserting the new variable into the results summary as shown in red. (Around line 1330 in V9). Again, remember the . that joins the strings together.

                # Now handle the results summary
                #
                my $sSummary = $SearchEchoText . ACTINIC::GetPhrase(-1, 264, $nMin + 1, $nMax, ($#Results + 1));
                That's it. Save and close the file, then update your website.

                It always good to make a copy of the file before making any changes just in case you make a mistake and edit something you didn't want to.

                If you have any feedback or encounter a problem then let me know.

                Mike

                PS. Actinic do not have my permission to add this to the knowledge base. They are of course free to develop their own workaround if they want to or to contact me for rights to this solution.
                -----------------------------------------

                First Tackle - Fly Fishing and Game Angling

                -----------------------------------------

                Comment

                Working...
                X