You are here:  » Coupon with dash


Coupon with dash

Submitted by sirmanu on Thu, 2017-11-16 11:44 in

Hi David.
I have a coupon which have a dash.
www.example.com/search.php?q=voucher:merchant:save10-0

The page 1 is displayed correctly, however, clicking the next one encodes the "-" so no results are found. Is only my problem?
Any ideas?

Submitted by support on Thu, 2017-11-16 12:24

Hi,

The hyphen would be removed by tapestry_normalise() however it would be no problem in the case of a voucher: query to re-normalise using the regexp only with the hyphen permitted - to do this edit search.php and look for the following code at line 171:

      case "voucher":

...and REPLACE with:

      case "voucher":
        $q = preg_replace('/[^'.$config_normaliseRegExp.'\-:]/','',$_GET["q"]);
        $parts = explode(":",$q);

Cheers,
David.
--
PriceTapestry.com

Submitted by sirmanu on Thu, 2017-11-16 18:01

Awesome David, it worked as expected.
Regards.