hi
Has anybody done a search box for a individual merchant. Seen the topics for drop down boxes, but aqll I want is a simple search box for a merchant
Thanks
Brent
Hi David
thanks for the quick response, works great as always
brent
Hi David,
Is it possible to have a merchant search box on a Wordpress page with 12/10A?
I have tried the solution in this thread and it doesn't seem to work.
Many thanks.
Cheers,
Hamish
Hi Hamish,
The above should work fine but make sure that the action attribute of the opening form tag points to the Price Tapestry installation, e.g.
<form method='get' action='/shopping/search.php'>
(if Price Tapestry is installed in /shopping/ for example)
Cheers,
David.
--
PriceTapestry.com
Hi Brent,
The easiest way to do this is to create a form that contains the merchant name as a hidden field, and then use a snippet of code at the top of search.php that redirects the page to the appropriate "merchant:Merchant Name:Keywords" query.
Here's the search form:
<form method='get' action='search.php'>
<input type='text' name='q' />
<input type='hidden' name='merchant' value='Merchant Name' />
<input type='submit' value='Search Merchant Name' />
</form>
And then almost at the very top of search.php, but after require("includes/common.php"); - add this code:
if ($_GET["merchant"])
{
$url = $config_baseHREF."search.php?q=merchant:".$_GET["merchant"].":".$_GET["q"];
header("Location: ".$url);
exit();
}
Hope this helps!
Cheers,
David.