Custom search
From Zen Cart(tm) Wiki
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.
[edit]
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.
