Hi
created a search sequence using WA products
with four search fields which are all "variable". With a lot of help etc I've sort of got it working apart from the search fails when certain search options are selected.
the code is below can anyone see where I've gone wrong?]
the combination that work or dont are:
search on price only I get no results
search on LOA only I get no results
search on berths only I get no results
search on LOA and Berths I get no results
search on price and berths I get no results
search on price and loa I get results
search on price, loa and berths I get results
thanks Ian
Code:
$WADbSearch1->addComparison("dt_Price","" . isset($_GET['S_dt_Price'])?($_GET['S_dt_Price'] -5000):$_GET['S_dt_Price'] . "","AND",">=",1); $WADbSearch1->addComparison("dt_Price","" . isset($_GET['S_dt_Price'])?($_GET['S_dt_Price'] +5000):$_GET['S_dt_Price'] . "","AND","<=",1);
$WADbSearch1->addComparison("dt_loa","" . isset($_GET['S_dt_loa'])?($_GET['S_dt_loa'] -10):$_GET['S_dt_loa'] . "","AND",">=",1); $WADbSearch1->addComparison("dt_loa","" . isset($_GET['S_dt_loa'])?($_GET['S_dt_loa'] +10):$_GET['S_dt_loa'] . "","AND","<=",1);
$WADbSearch1->addComparison("dt_berths","" . isset($_GET['S_dt_berths'])?($_GET['S_dt_berths'] -2):$_GET['S_dt_berths'] . "","AND",">=",1); $WADbSearch1->addComparison("dt_berths","" . isset($_GET['S_dt_berths'])?($_GET['S_dt_berths'] +2):$_GET['S_dt_berths'] . "","AND","<=",1);
created a search sequence using WA products
with four search fields which are all "variable". With a lot of help etc I've sort of got it working apart from the search fails when certain search options are selected.
the code is below can anyone see where I've gone wrong?]
the combination that work or dont are:
search on price only I get no results
search on LOA only I get no results
search on berths only I get no results
search on LOA and Berths I get no results
search on price and berths I get no results
search on price and loa I get results
search on price, loa and berths I get results
thanks Ian
Code:
$WADbSearch1->addComparison("dt_Price","" . isset($_GET['S_dt_Price'])?($_GET['S_dt_Price'] -5000):$_GET['S_dt_Price'] . "","AND",">=",1); $WADbSearch1->addComparison("dt_Price","" . isset($_GET['S_dt_Price'])?($_GET['S_dt_Price'] +5000):$_GET['S_dt_Price'] . "","AND","<=",1);
$WADbSearch1->addComparison("dt_loa","" . isset($_GET['S_dt_loa'])?($_GET['S_dt_loa'] -10):$_GET['S_dt_loa'] . "","AND",">=",1); $WADbSearch1->addComparison("dt_loa","" . isset($_GET['S_dt_loa'])?($_GET['S_dt_loa'] +10):$_GET['S_dt_loa'] . "","AND","<=",1);
$WADbSearch1->addComparison("dt_berths","" . isset($_GET['S_dt_berths'])?($_GET['S_dt_berths'] -2):$_GET['S_dt_berths'] . "","AND",">=",1); $WADbSearch1->addComparison("dt_berths","" . isset($_GET['S_dt_berths'])?($_GET['S_dt_berths'] +2):$_GET['S_dt_berths'] . "","AND","<=",1);