Hi David
I've come across a new issue with my voucher codes. I'm not using the new voucher code update you've released in the new version, I'm using the previous one.
One of the merchants is using voucher codes with a hyphen, eg: GHJ-890
Whenever I click on the voucher code merchant name/logo on the coupons, it usually takes me to a page displaying the products the code is applicable to but I'm getting the 'no results found' page for the codes with hyphens.
Is there a fix for this please?
Here's an example on my site {link saved}
Thanks!
Bat
Hi David,
Thanks, just tried it but it doesn't appear to be working...
Ah sorry bat, $q not set at that point - use instead as the replacement:
$q = (isset($_GET["q"])?$_GET["q"]:"");
if (substr($q,"voucher:")!==0) $q = tapestry_normalise($q,":\.");
Cheers,
David.
--
PriceTapestry.com
Hello bat,
Ah I see - this is because of the normalisation that takes place at the top of search.php, which removes hyphens (since they are used in place of spaces in clean URLs).
Simplest solution would be to prevent normalisation of the input "q" parameter if it begins "voucher:", so to do this, edit search.php and look for the following code at line 6:
$q = (isset($_GET["q"])?tapestry_normalise($_GET["q"],":\."):"");
...and REPLACE with:
if (substr($q,"voucher:")!==0) $q = (isset($_GET["q"])?tapestry_normalise($_GET["q"],":\."):"");
Cheers,
David.
--
PriceTapestry.com