Announcement

Collapse
No announcement yet.

customer searches

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

    customer searches

    One very missed feature of using power search was the ability to quickly see search terms and the qty of results the customer received.
    It was very quick and in the Miva admin...
    Mark Hood
    Vermont Gear

    #2
    why not just create a simple log using 'file_append' function at the bottom of the search page. add session id (if you're not using deferred baskets) and then just call the file via the front end.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      That may be a working solution to look into. Would be possible to also show the amount of results they got from the search?

      Screen Shot 2020-01-17 at 8.43.36 AM.png
      Mark Hood
      Vermont Gear

      Comment


        #4
        Yes, there should be a 'results' variable (don't know it off the top of my head) providing the number of items returned. if not, you could always run

        <mvt:assign name="g.totalFound" value="miva_array_max(l.settings:search_results)"/>

        (note, not sure that's the actual name of the return array so check that too.)
        (also note: in case anyone wants sample "create log file", there's and example here: https://docs.miva.com/template-language/write-csv-file
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          ok, i thought the "items found" was a great idea, so i went to a site where we do this...but we already have that...so here's the complete code. still might need to check variables...and I was lazy so i didn't do a test for the log file name. I just created an empty file and uploaded it (actually used Edit This to just create the file) before hand
          Code:
             <mvt:assign name="g.filename"    value="'search.log'" />
             <mvt:assign name="g.filepath"    value="'/'" />
             <mvt:assign name="g.newline"     value="asciichar(10)$asciichar(13)" />
          
             <mvt:assign name="g.dump"        value="g.date$'|'$g.search$'|'$g.session_id$'| Found: '$l.settings:search_product_count$g.newline"/> 
          
             <mvt:assign name="g.file_append" value="file_append(g.filepath$g.filename, 'script', g.dump)" />
          note: if you are using Deferred Baskets, the g.session_id won't be useful since it will change on every page request until something is added to the basket.

          This site isn't using it, but i know on another site I wrote a 'search.log Reader' script that would group session ids and then search terms to make it more readable. If i remember where that was, i'll post that as well.
          Bruce Golub
          Phosphor Media - "Your Success is our Business"

          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
          phosphormedia.com

          Comment


            #6
            Originally posted by Bruce - PhosphorMedia View Post
            ok, i thought the "items found" was a great idea, so i went to a site where we do this...but we already have that...so here's the complete code. still might need to check variables...and I was lazy so i didn't do a test for the log file name. I just created an empty file and uploaded it (actually used Edit This to just create the file) before hand
            Code:
            <mvt:assign name="g.filename" value="'search.log'" />
            <mvt:assign name="g.filepath" value="'/'" />
            <mvt:assign name="g.newline" value="asciichar(10)$asciichar(13)" />
            
            <mvt:assign name="g.dump" value="g.date$'|'$g.search$'|'$g.session_id$'| Found: '$l.settings:search_product_count$g.newline"/>
            
            <mvt:assign name="g.file_append" value="file_append(g.filepath$g.filename, 'script', g.dump)" />
            note: if you are using Deferred Baskets, the g.session_id won't be useful since it will change on every page request until something is added to the basket.

            This site isn't using it, but i know on another site I wrote a 'search.log Reader' script that would group session ids and then search terms to make it more readable. If i remember where that was, i'll post that as well.
            Thank you!! This is certainly headed the right direction.
            Mark Hood
            Vermont Gear

            Comment

            Working...
            X