latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Pro-Coupons and Free Registration…

Home Forums Community Forum Pro-Coupons and Free Registration…

This topic contains 9 replies, has 3 voices. Last updated by  Bruce 4 years ago.

Topic Author Topic
Posted: Thursday Dec 27th, 2012 at 11:40 am #35546

The site is partnering with Groupon and others like it to sell membership subscriptions. I have run into a problem when trying to add a coupon field to the free registration form. I have tested on other registration forms and the coupon field works. However, it does not show on the free registration form. Is there another way to incorporated this functionality that I have overlooked.

Please advise…

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Thursday Dec 27th, 2012 at 11:45 am #35547
Stuart Giles
Username: Juggy69

Hi Mike,

Not meaning to sound rude here and i may be wrong, but my logic says that “How can you get a discount on something that is free”?

Regards

Stuart

Posted: Thursday Dec 27th, 2012 at 11:50 am #35550

Stuart,

I was not looking for a way to discount a Free registration. Only looking for a way to tie coupon codes for a purchased subscription through Groupon within the s2Member registration. It is my understanding that S2Member cannot have a 100% coupon. This was the only way I could see to work around that issue.

Posted: Friday Dec 28th, 2012 at 11:26 am #35622

To clarify the issue:

I have a list of coupon codes from Groupon that are being entered into the coupon code page. However, the codes are being used for the payment of registration. The only way to implement this within S2 is using a Free Registration with a coupon field. The coupon field is not generating on the Free Registration form. Is there another way to implement this functionality within S2 that has been overlooked. I have scoured the forums and have yet to find a clear solution.

Thank you

Posted: Saturday Dec 29th, 2012 at 4:13 pm #35746
Bruce
Username: Bruce
Staff Member

Hi Mike,

You’ll need to check out the info under Knowledge Base » Offering a Free Coupon Code (100% Discount). You’ll need to use a modified version of these instructions and create a coupon form outside of s2Member’s processes. s2Member does not support adding coupons to free registration forms. If, however, you’d rather just add this functionality to the free registration forms, you can try editing the file /s2member-pro/includes/templates/forms/paypal-registration-form.php.

Posted: Sunday Dec 30th, 2012 at 3:53 pm #35821

Hello Bruce,

Thank you for your response. If I were to modify the registration form. Would I use the Authorize.net form since that is what we are using for the paid registrations? If so, where is the php that calls up the coupon codes from S2?

Posted: Sunday Dec 30th, 2012 at 7:08 pm #35828

One other thing… In the knowledge base, one of the options includes:
“Create a custom HTML form that accepts a voucher/coupon code and then write custom PHP code to check the code against a known-list of codes, only providing access to the form if the code is valid.”

Can we get some further instruction on how to go about this?

Posted: Tuesday Jan 1st, 2013 at 6:19 pm #35936
Bruce
Username: Bruce
Staff Member

One other thing… In the knowledge base, one of the options includes:
“Create a custom HTML form that accepts a voucher/coupon code and then write custom PHP code to check the code against a known-list of codes, only providing access to the form if the code is valid.”

Can we get some further instruction on how to go about this?

The idea here would be to create an HTML form like this:

<form method="post" action="">
Your Coupon Code: <input type="text" name="s2m_coupon_show" />
</form>

Then, to verify that it’s the right code, you’d do something like this:

<?php if(!empty(($coupon = $_POST&#91;'s2m_coupon_show'&#93;)) && is_correct_code($coupon) /* NOTE: The is_correct_code() function isn't something s2Member has set up, you'll need to do this. */) { ?>
This is where your unlocked signup would go.
<?php } else { ?>
This is the form for inputting a custom coupon code, outside of s2Member.
<form method="post" action="">
Your Coupon Code: <input type="text" name="s2m_coupon_show" />
<input type="submit" value="Submit " />
</form>

Your normal signup shortcode / anything that the user should see before they've put in a coupon above.
<?php } ?>

Thank you for your response. If I were to modify the registration form. Would I use the Authorize.net form since that is what we are using for the paid registrations? If so, where is the php that calls up the coupon codes from S2?

Yes, If you’re using Authorize.net, the correct file to alter would be /s2member-pro/includes/templates/authnet-registration-form.php

Posted: Wednesday Jan 2nd, 2013 at 12:14 pm #36000

Hello Bruce,

Thank you for your response. However, is this form checking the list of codes loaded in the dashboard for the coupon codes?

Posted: Thursday Jan 3rd, 2013 at 2:16 pm #36123
Bruce
Username: Bruce
Staff Member

Hi Mike,

Thank you for your response. However, is this form checking the list of codes loaded in the dashboard for the coupon codes?

No, to do this you’d need to grab the coupon codes from the WordPress Dashboard and use them to validate this. The code above doesn’t really validate anything, as I’m not sure how you’re handling this exactly.

Viewing 9 replies - 1 through 9 (of 9 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.