I would like to do a hyperlink to a search for specific products from specific merchant.
ie www.mydomain.co.uk/search.php?q= merchant + keyword
How would I do this please?
ta
Jill
Thanks David
I was so close! I just didn't put the + in!
---------
Jill
Hi David
This seemed like the answer to my prayers but I can't get it to work - for example:
{link saved}
I know I'm missing something really obvious - I just don't know what? :)
This is version 11/09A
Cheers
Darren
Hi Darren,
In search.php, look for the following code at line 88:
$where .= " ".$field." = '".database_safe($parts[$i])."' ";
...and REPLACE with:
if ($field)
{
$where .= " ".$field." = '".database_safe($parts[$i])."' ";
}
else
{
$where .= " name LIKE '%".database_safe($parts[$i])."%' ";
}
$field = "";
...and then the example query you're using will work as expected...
Cheers,
David.
--
PriceTapestry.com
Cheers David
That certainly does the trick - I'm assuming if I change the same line in search external than that will work the same?
Thanks
Darren
Hi Darren,
Yes - should work exactly the same.
Cheers,
David.
--
PriceTapestry.com
Hi Jill,
The merchant: search operator supports additional keywords - which you can provide after a second ":", for example:
search.php?q=merchant:Some+Merchant:Keyword1+Keyword2
(spaces are encoded as + in URLs)
Cheers,
David.