Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Capturing Search Queries


mpiscopo

Recommended Posts

Does anyone know of a mod which will capture the words entered in a search and save it to the database? I would like to know what people are searching for when on my site, it will tell me what products to introduce.

Link to comment
Share on other sites

I don't know of any contributions but you could capture them via the error_log function.

 

In catalog/advanced_search_results.php around line 248 find

for ($i=0, $n=sizeof($search_keywords); $i<$n; $i++ ) {

 

add the following code after that line

      error_log($search_keywords[$i] . "\n", 3, "d:\\temp\\keywords.txt");

 

Change the third parameter to a path that is appropriate for your environment.

 

HTH

Tom

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...