18 Aug 2011, 6:59 PM
Zen Follower
- Join Date:
- Jul 2009
- Location:
- Texas
- Posts:
- 210
- Plugin Contributions:
- 0
Search without Keywords - Redirect to Manufacturers Page
I found this old thread about searching without keywords. My idea was that if someone was to choose the manufacturer and nothing else it should just redirect to the manufacturers page even though they weren't actually 'searching' for anything.
I made a small adjustment to:
/includes/modules/pages/advanced_search_result/header_php.php
I removed these lines:
$error = true;
$missing_one_input = true;
$messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT );
And replaced it with this:
if(isset($_GET['manufacturers_id']) && !empty($_GET['manufacturers_id'])) {
zen_redirect( zen_href_link(FILENAME_DEFAULT, 'main_page=index&manufacturers_id=' . $_GET['manufacturers_id']));
} else {
$error = true;
$missing_one_input = true;
$messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT );
}
Hope this helps someone else.
DentalPlanet Designed/Administrated by Falls Geek