Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

making the plus sign a search operator in search


diy

Recommended Posts

Posted

Is there a way to make the plus (+) sign a search operator???

 

i see that people usually search my site using + as a search operator and they end up with NO results at all!!

Posted
Is there a way to make the plus (+) sign a search operator???

 

the quick and dirty way would be to adjust the search string. something like this...on about line 50 in advanced_search_results.php you see

if (isset($HTTP_GET_VARS['keywords'])) {

$keywords = $HTTP_GET_VARS['keywords'];

}

 

change this to:

if (isset($HTTP_GET_VARS['keywords'])) {

$keywords = str_replace('+', ' and ', $HTTP_GET_VARS['keywords']);

}

Posted

Simplest solution would be to remove the + by applying str_replace to the keywords

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...