Hi David,
I've searched the forum but unable to see an answer.
When using searchExternal, I sometimes want to show search results of a keyword from a specific merchant, brand or categoy. How would I be able to do so?
At the moment, I've got this:
$common_baseHREF = "http://www.example.com/";
$common_path = "/path/to/example/site/";
$_GET["q"] = "dress";
require($common_path."searchExternal.php");
so lets say I wanted to show only dresses from a merchant named New Look. What would be the code for that please?
Thanks.
Hi bat,
Sure - to add support for $_GET["merchantFilter"], edit your current version of searchExternal.php and look for the following code:
if ($q)
...and REPLACE with:
$merchantFilter = (isset($_GET["merchantFilter"])?$_GET["merchantFilter"]:"");
if ($merchantFilter)
{
$priceWhere .= " AND merchant = '".database_safe($merchantFilter)."' ";
}
if ($q)
Then use the calling code;
$common_baseHREF = "http://www.example.com/";
$common_path = "/path/to/example/site/";
$_GET["q"] = "dress";
$_GET["merchantFilter"] = "New Look";
require($common_path."searchExternal.php");
Cheers,
David.
--
PriceTapestry.com