You are here:  » Additional data to vouchers

Active Forum Topics


Additional data to vouchers

Submitted by sirmanu on Mon, 2018-09-10 15:18 in

Hi David.

I am looking for add new columns to pt_vouchers table.
I want to have a button which allow me to choose if a voucher is public or not (appearing into vouchers.php). Sometimes there are a lot of activated vouchers, but some of them are useless (by default would be yes).
Secondly, is any way to add a new field called landing_page into pt_vouchers or something like that? Some merchants provide a page where you can find more products promoted. I can show this information along the voucher code.

Thank you!

Submitted by support on Tue, 2018-09-11 12:18

Hi,

Check out this thread for a modification to add a specific link for the voucher code.

The mod as it stands would replace the link to search results for that voucher code (modification to vouchers.php line 17) however if you'd like to leave that as-is, you could just add the link to the description, in which case look for the following code at line 56:

      $vouchers[$k]["text"] .= " ".translate("using voucher code")." <strong>".$voucher["code"]."</strong>";

...and REPLACE with something like;

      $vouchers[$k]["text"] .= " ".translate("using voucher code")." <strong>".$voucher["code"]."</strong>";
      if ($voucher["link"])
      {
        $vouchers[$k]["text"] .= " <a href='".$voucher["link"]."'>More info...</a>";
      }

Let me know once that aspect is working how you'd like, and I'll work out the mods for an enable / disable checkbox...

Cheers,
David.
--
PriceTapestry.com