Zen Cart Logo
Forums / General Questions / intercepting search results

intercepting search results

Locked

Views: 531

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
4 Aug 2009, 1:16 AM
#1
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

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?

4 Aug 2009, 3:37 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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.