Using coupon with S2 member
-
I’ve been trying various options to incorporate a free offer on a test paid site. (by the way I have deactivated all plugins at one point to try to get this to work). I’m using S2Member as the payment gateway along with a php exec plugin (tried a couple – doesn’t make any difference). I’ve set up a page where a user can enter a coupon (say, ‘free’)- this is what it looks like:
Welcome blah blah
<form id="voucherForm" method="post" action="paidpage"> <input name="voucher" type="text" maxlength="15" value=""/> <input id="saveForm" type="submit" name="submit" value="Submit" /> </form>
So key in the voucher ‘free’ and it goes to the payment page
On the paid page I have the following:
Welcome blah blah<?PHP if (isset($_GET['voucher'])) { echo "Voucher is set!"; if ($_GET['voucher'] == 'free') { echo "And, voucher is 'free'. Must redirect!"; header("Location: freepage"); } } else { echo "now show the payment form..."; // Show the payment form page. } ?>
It doesn’t matter what I put on the original form I just get:
now show the payment form… etc
Any ideas where I am going wrong? Certainly it appears the voucher is not being included into the forwarding url from the submit page and there are no other messages. Is this something to do with the way the server handles the request and how can I check this or could it be a template issue? etc etc etc
Many thanks.
- The topic ‘Using coupon with S2 member’ is closed to new replies.