PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Force Terms/Conds Agreement via PayPal Button

Common Questions/Problems/Tips. Posted by Administrators & Support Reps.

Force Terms/Conds Agreement via PayPal Button

Postby Jason Caldwell » March 22nd, 2011, 9:39 pm

Many site owners ask me if there is a way to force Customers to agree to their Terms/Conditions before they are allowed to continue with checkout. There are many ways to accomplish this, and the solution that you choose might be different, depending on whether you're using s2Member, or s2Member Pro.

s2Member Pro Forms ( via Custom Registration Field )
If you're using s2Member Pro with PayPal® Pro Forms, or Pro Forms for Authorize.Net® integration, the simplest way to accomplish this is with a Custom Registration Field that you configure with s2Member. In your Dashboard, under: s2Member -> General Options -> Custom Registration Fields, you can create a Checkbox field that is required, and in your description of this field, you can even include HTML code that may provide a link to your Terms/Conditions. ~So this is pretty simple, because your site is already integrated with s2Member Pro Forms. In other words, checkout occurs on your site! Very simple.

s2Member Payment Buttons ( i.e. PayPal® Standard, or similar )
In this case, checkout does NOT actually take place on your site. All you're doing is providing the potential Customer with a Payment Button, which sends them through the checkout process at PayPal®, or perhaps at ClickBank®, AliPay®, Google® Checkout, or another Payment Gateway that integrates with s2Member through the application of Payment Buttons.

In this case, you don't have s2Member Pro Forms working for you, so you'll need to be a little more creative. The code sample below will accomplish this for you. You'll need to make sure that you paste this into the HTML Tab of your Post/Page editor in WordPress®; otherwise the code will get corrupted by the Visual Editor. Be sure to replace [s2Member-PayPal-Button ... output="url" /] with your own ShortCode.
Code: Select all
<form onsubmit="return false;">
    <input id="our-terms-conds" type="checkbox" /> Yes, I agree to the Terms/Conditions.
    <a href="[s2Member-PayPal-Button ... output="url" /]" onclick="if(!document.getElementById('our-terms-conds').checked){ alert('You MUST check the box that you agree.'); return false; }"><img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" border="0" alt="PayPal®" /></a>
</
form> 
* Always use output="url" in your Shortcode.
That part of your Shortcode must be configured manually when you use this technique.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Force Terms/Conds Agreement via PayPal Button

Postby Black Dynamite » August 10th, 2011, 11:15 am

I'm using the free version of S2Member and would like to ask users to enter their date of birth, sign up for email blast and force acceptance of terms and conditions before they can continue. All this is for free registration. I am not a programmer, so please walk me through this step by step. Thank you
User avatar
Black Dynamite
Registered User
Registered User
 
Posts: 7
Joined: August 10, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Cristián Lávaque » August 10th, 2011, 12:33 pm

Try using the custom registration fields. WP Admin -> s2Member -> General Options -> Custom Registration Fields/Options

The emails part, if you integrate s2Member with MailChimp or AWeber, could be done from the List Server settings. WP Admin -> s2Member -> API / List Servers -> Registration / Double Opt-In Box

http://www.s2member.com/api-list-servers-video/
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Force Terms/Conds Agreement via PayPal Button

Postby Black Dynamite » August 11th, 2011, 10:29 am

Ok, so I configured the email. THANK YOU

I'm a bit lost on how to set up the birthday as well as forcing terms and conditions. If you could do it step by step again I can handle it.

P.S. The video helped a lot.
User avatar
Black Dynamite
Registered User
Registered User
 
Posts: 7
Joined: August 10, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Cristián Lávaque » August 11th, 2011, 1:54 pm

Cool. Here's a video for the General Options, where the custom registration fields panel is: http://www.s2member.com/general-options-overview-video/
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Force Terms/Conds Agreement via PayPal Button

Postby Black Dynamite » August 11th, 2011, 11:02 pm

So I went through several of those videos and I do NOT know what to do.

All I want to do is ADD a DOB field MM/DD/YYYY, but I don't know what to choose in START A NEW SECTION>FORM FIELD TYPE> FIELD LABEL/DESC>UNIQUE FIELD ID>

DEFAULT TEXT VALUE>
EXCEPTED FORMAT>

If you could answer these for me it would help a lot?
---------------------------
More over, you haven't showed me or told me anything that will let me force TERMS and CONDITIONS before a user can successfully register. Can you help?
User avatar
Black Dynamite
Registered User
Registered User
 
Posts: 7
Joined: August 10, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Cristián Lávaque » August 11th, 2011, 11:17 pm

- Unique Field ID is to identify the field (e.g. date, terms).
- Field Label/Desc is how it'd be shown in the form (e.g. Date of Birth, Terms & Conditions).
- Starts A New Section can be No if it doesn't start a new section in the form.
- Form Field Type can be checkbox for the T&C and text for the DOB.
- Default value is what the form would have written in the field before the user inputs anything.
- For the T&C Field Required: yes.
- For the date, Expected Format: Date.

I hope that helps.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Force Terms/Conds Agreement via PayPal Button

Postby Black Dynamite » August 11th, 2011, 11:41 pm

A little. So I made a check bod for T&C, but where would a users read the T&C?

DOB... is the only way a user can enter DOB by text?
User avatar
Black Dynamite
Registered User
Registered User
 
Posts: 7
Joined: August 10, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Black Dynamite » August 11th, 2011, 11:52 pm

Ok, so I solved the DOB issue thanks to your help. Just use Text single line and select the Expected Format.

So the last thing in regards to this topic is T&C. I created the check box, but there's nothing for them to read. lol.
User avatar
Black Dynamite
Registered User
Registered User
 
Posts: 7
Joined: August 10, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Cristián Lávaque » August 12th, 2011, 10:56 am

You can make the description an HTML link to your T&C doc.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Force Terms/Conds Agreement via PayPal Button

Postby Black Dynamite » August 12th, 2011, 9:40 pm

How do you do that?
User avatar
Black Dynamite
Registered User
Registered User
 
Posts: 7
Joined: August 10, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Cristián Lávaque » August 12th, 2011, 9:45 pm

Like in a normal web page, only you put the anchor tag for the label of the Custom Registration Field. Google HTML anchor tag.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Force Terms/Conds Agreement via PayPal Button

Postby Black Dynamite » August 12th, 2011, 10:46 pm

ALRIGHT! You've been a great help in those areas.
Now, while I still have you can I ask you if there is a way to restrict access to anyone younger than 7 and over 18?
User avatar
Black Dynamite
Registered User
Registered User
 
Posts: 7
Joined: August 10, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Cristián Lávaque » August 12th, 2011, 10:49 pm

No, s2Member doesn't have that yet. I'm sure you could probably have it custom coded to add that functionality, though.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Force Terms/Conds Agreement via PayPal Button

Postby esljosh » August 24th, 2011, 2:31 am

Jason,

My theme (or something) doesn't like the comments generated by the short codes for the paypal buttons, so your code at the top...

<form onsubmit="return false;">
<input id="our-terms-conds" type="checkbox" /> Yes, I agree to the Terms/Conditions.
<a href="[s2Member-PayPal-Button ... output="url" /]" onclick="if(!document.getElementById('our-terms-conds').checked){ alert('You MUST check the box that you agree.'); return false; }"><img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" border="0" alt="PayPal®" /></a>
</form>


Doesn't work for me... do you have any suggestions?
User avatar
esljosh
Registered User
Registered User
 
Posts: 5
Joined: August 1, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Cristián Lávaque » August 25th, 2011, 3:33 am

Josh, you shouldn't get button code when you output a URL. Could you please post here the code you're using?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Force Terms/Conds Agreement via PayPal Button

Postby s_d_p » September 1st, 2011, 3:21 pm

I'm trying to force users to agree to terms and conditions when trying to purchase access to a specific post/page. We want to allow guest access to the site, so it doesn't help me to add the custom field to the registration page (since some users will never register). I'm using the S2Pro. Is there a way to insert a custom field into the paypal pro form? Thanks!
User avatar
s_d_p
Registered User
Registered User
 
Posts: 23
Joined: July 26, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby antseo » September 4th, 2011, 3:57 am

Is it possible to place a TOS checkbox on the registration form instead of the paypal button?
User avatar
antseo
Experienced User
Experienced User
 
Posts: 127
Joined: September 2, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Cristián Lávaque » September 5th, 2011, 12:56 am

Yes, it's been explained a few replies above. You create a required custom registration field, a checkbox, and make the description an HTML link to your T&C doc. WP Admin -> s2Member -> General Options -> Custom Registration

I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Force Terms/Conds Agreement via PayPal Button

Postby antseo » September 5th, 2011, 1:11 am

thanks, figured it out.
User avatar
antseo
Experienced User
Experienced User
 
Posts: 127
Joined: September 2, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby s_d_p » September 5th, 2011, 9:26 am

This makes me feel stupid, but I'm still not clear on how this should work. I've created the custom field several times, but it doesn't appear when I create a pro form. That admin panel has this under the field:

Examples: country_code, street_address
e.g. [s2Get user_field="country_code" /]

My field is called tou... so does this mean that I place [s2Get user_field="tou" /] somewhere? If so, where?
User avatar
s_d_p
Registered User
Registered User
 
Posts: 23
Joined: July 26, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby s_d_p » September 5th, 2011, 10:35 am

Aha. The custom field DOES appear on my registration form for my site. But this is not the solution to my questions. I want to add a custom field (terms/conditions) to my PRO FORM when a user buys access to a specific page/post. So I guess I'm restating my question: can I add a custom field to my pro form?
User avatar
s_d_p
Registered User
Registered User
 
Posts: 23
Joined: July 26, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Jason Caldwell » September 6th, 2011, 2:00 pm

I see, thanks for your clarification.

Sorry, Custom Registration/Profile Fields for s2Member, are only supported for Users/Members. So while it is possible to do what Cristián was talking about, with a Custom Registration Field, it is NOT possible to do this with a Pro Form for "Specific Post/Page Access", because that functionality is designed to work independently from Membership Level Access. That is, Specific Post/Page purchases do not support Custom Registration Fields.

What you CAN do though, is create a custom template for Specific Post/Page Access, and build a checkbox for T&C into your template. Then specify your custom template in the Pro Form Shortcode for s2Member.
Code: Select all
[s2Member-PayPal-Pro-Form ... template="my-template.php" /]
( This Shortcode is abbreviated for clarity in this regard )

Is it possible to modify the PayPal® and/or Authorize.Net® Pro Form templates?
Usually not necessary. But yes, if you really need to. Please check your /s2member-pro/includes/templates/forms/ directory. You can take the default templates, and place some ( or all of them ) into your own WordPress® theme directory. s2Member Pro will automatically find your custom templates there. By placing custom templates into your theme directory, you can be sure they won't get overwritten in a future upgrade. Either that, or you can just use the default templates like they are, and customize them with your own CSS rules inside the Stylesheet for your WordPress® theme ( i.e. style.css ). If you're using a PriMo Theme ( for instance, the s2Clean Theme ), check your Theme Options Panel, under: Custom CSS / Style Sheet.

So, in your case, take this file:
/s2member-pro/includes/templates/forms/paypal-sp-checkout-form.html
Make a copy in your WordPress theme directory and modify it however you like. If you rename the template file, be sure to specify the new name in the template="" Attribute of your Shortcode.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Force Terms/Conds Agreement via PayPal Button

Postby s_d_p » September 6th, 2011, 3:52 pm

This is great. Exactly what I was looking for. One follow-up question...
I need to make my "Terms and Conditions" checkbox mandatory. Can you point me to the script that handles the form? (The template file has a %%action%% shortcode)
User avatar
s_d_p
Registered User
Registered User
 
Posts: 23
Joined: July 26, 2011

Re: Force Terms/Conds Agreement via PayPal Button

Postby Jason Caldwell » September 6th, 2011, 3:59 pm

Very welcome.
Add an submission handler to the Pro Form.

Something like this at the bottom of your template file perhaps:
Code: Select all
<script type="text/javascript">
(function($)
    {
        $('form#s2member-pro-authnet-sp-checkout-form').submit (function()
            {
                if (/* Run your conditional here. */)
                    {
                        alert('Please check the box that you agree!');
                        return false;
                    }
                else
                    return true
;
            });
    })(jQuery);
</script>
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Next

Return to Common Questions/Problems/Tips

Who is online

Users browsing this forum: No registered users and 2 guests

cron