Support » Fixing WordPress » 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" />

    So key in the voucher ‘free’ and it goes to the payment page
    On the paid page I have the following:
    Welcome blah blah

      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.

Viewing 1 replies (of 1 total)
  • Just as an added debug note if I add the actual voucher into my form page so it reads –

    Then my paid page still does not redirect but I get the following messages:

    Voucher is set!And, voucher is ‘free’. Must redirect!free

Viewing 1 replies (of 1 total)
  • The topic ‘Using coupon with S2 member’ is closed to new replies.