View Single Post
  #1  
Old 12-06-2005, 07:07 PM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Guru
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 3,062
 

Default Search queries via a URL in version 4.0.x & 4.1.x!!

I know a lot of you need to have links to search results (like the old x-cart versions could). Now you can with this very simple mod!

In search.php (in your main X-cart directory, not in the include folder!) Find the following code:
Code:
x_session_register("search_data");

Insert this code AFTER the code you found above:
Code:
# BCSE begin if($search) { $search_data['products']['substring']=$search; $mode="search"; } # BCSE end

To use this mod just point your browser to urls like this:
http://yourdomain.com/search.php?search=SEARCHQUERYHERE

If you need spaces in the query to include multiple words use + inbetween like this:
http://yourdomain.com/search.php?search=SEARCH+QUERY+HERE

Hope this helps some of you!

Carrie

Note this works in 4.1.x as well!!
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote