Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006
    Posts
    308
    Plugin Contributions
    0

    Default intercepting search results

    I have a number of common search phrases that visitors enter on the catalog search tool on my site. Is there a way for me to hijack the results when the phrase matches one of the predefined phrases, and redirect to any page I want?

    For example, a search for trap bar brings up many irrelevant results, and the only trap bar I have is on page 6 of the results. I want to bring up that item. Or with an olympic barbell search, I want to bring up the olympic bars category. And so on.

    How would I go about making this mod?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: intercepting search results

    You could try working with a notifer/observer to hook into the 'NOTIFY_HEADER_START_ADVANCED_SEARCH_RESULTS' notifier point, and modify the $_GET['keyword'] values after some pre-parsing. Or hard-code your changes inside the /includes/modules/pages/advanced_search_result/header_php.php file.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Search and Advanced search not returning results
    By paisore in forum General Questions
    Replies: 6
    Last Post: 4 Nov 2010, 03:43 PM
  2. Search Is not displaying all results/Search with Dash (-)
    By AZComp in forum General Questions
    Replies: 20
    Last Post: 25 Mar 2010, 08:25 PM
  3. Is there a way to have advanced search results open the results in a new window?
    By member in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Mar 2008, 08:27 PM
  4. Replies: 3
    Last Post: 27 Aug 2007, 08:29 PM
  5. Replies: 8
    Last Post: 5 Dec 2006, 10:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg