Custom search

From Zen Cart(tm) Wiki
Revision as of 22:02, 17 November 2006 by Blindside (talk | contribs) (Reverted edits by Torke (Talk); changed back to last version by Allcanadiansearch.ca)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The query for the search feature in the shop is created (for v1.2.x) in:

includes/blocks/blk_advanced_search_result.php


At this time you can not override this file.


If you want to adjust which database columns to search through, you would have to manipulate the variable $where_str in that file.


Remember that by combining php and html (html would go in the proper template file) you can use form input, like checkboxes or drop-down menus, to decide how to create the query.


Sort order

The search results use the same sort order as the other product listings. If you want to use a separate sort order for search results, you need to adjust the variable $order_str in

includes/blocks/blk_advanced_search_result.php


To change the general product listing sort order, see Admin - Configuration - Product Listing.