Hi David,
You created a mod so I could include custom searches in my sidebar:
$srchinfoFilename = "srchinfo/directory/".$srchinfoName.".html";
The file naming for a brand, merchant or keyword is straightforward (keyword.html, merchant_name.html). However, I have some searches that include a keyword and a merchant filter ( q=keyword&merchantFilter=Merchant).
Is it possible to name the .html file to include both the keyword & a merchant or brand?
Hi,
Looking back at our email I see you have code something like this;
$srchinfoName = str_replace(array(":",".","/"," "),"_",trim($q,":"));
$srchinfoFilename = "srchinfo/".$srchinfoName.".html";
So what you could do is that if a merchant filter filter in effect, append with "_Merchant" to the base name ($srchinfoName) and similarly if a brand filter is in effect - have a go with something like;
$srchinfoName = str_replace(array(":",".","/"," "),"_",trim($q,":"));
if ($merchantFilter)
{
$srchinfoName .= "_".str_replace(" ","_",tapestry_normalise($merchantFilter));
}
if ($brandFilter)
{
$srchinfoName .= "_".str_replace(" ","_",tapestry_normalise($brandFilter));
}
$srchinfoFilename = "srchinfo/".$srchinfoName.".html";
And then use, for example;
srchinfo/keyword_Merchant_Name.html
Cheers,
David.
--
PriceTapestry.com