You are here:  » Renaming vouchers.php to coupons.php for US market


Renaming vouchers.php to coupons.php for US market

Submitted by Convergence on Thu, 2012-07-12 21:44 in

Greetings,

How difficult is it to rename vouchers.php to coupons.php for the US market?

Thanks!

Submitted by support on Fri, 2012-07-13 07:38

Hi,

That's no problem at all - the only thing to be wary of is not to confuse the renamed file with html/coupons.php - that's all!

Cheers,
David.
--
PriceTapestry.com

Submitted by Convergence on Fri, 2012-07-13 22:54

Hi David,

One little problem with simply renaming the file.

Within vouchers.php is the following code on/about line 17:

$vouchers[$k]["href"] = $config_baseHREF."search.php?q=voucher:".urlencode($voucher["merchant"]).":".urlencode($voucher["code"]);

We want to change "search.php?q=voucher:" to "search.php?q=coupon:" - however, that doesn't seem to work.

Suggestions?

Thanks!

Submitted by support on Sat, 2012-07-14 07:06

Hi,

you can do that, however you also need to change the corresponding line in search.php - look for the following code at line 114:

      case "voucher":

...and REPLACE with:

      case "coupon":

Cheers,
David.
--
PriceTapestry.com

Submitted by Convergence on Sat, 2012-07-14 07:28

Good Morning, David -

PERFECT. Thank you!

Submitted by Actual on Thu, 2014-02-27 19:18

David,

Can you help... I'm not overly concerned about changing the filename 'voucher' to 'coupon' but I am also trying a sister website (in the same niche as my UK one), so would need to change everywhere PT states "voucher" to instead display "coupon" for the US visitor.

Which files and where do I need to edit?

Thanks in advance.

Steve.

Submitted by support on Fri, 2014-02-28 09:21

Hi Steve,

There are just two translation strings to change, so if you edit includes/translate.php and after the example line add the following:

  $translate["using voucher code"] = "using coupon code";
  $translate["There are no voucher codes to display."] = "There are no coupon codes to display.";

Cheers,
David.
--
PriceTapestry.com