Page 1 of 1

100% Custom Registration page with s2member integration

PostPosted: September 9th, 2010, 4:13 pm
by geekz
Hello.
Thanks for the cool plugin. Please help me for this small problem.


I have created a custom registration page template.
I have used wordpress wp_create_user :oops: function to do this.
Here is a snippet :
Code: Select all
$myuser_id = wp_create_user( $uname, $password, $remail );
update_user_meta( $myuser_id, 'first_name', $fname);
update_user_meta( $myuser_id, 'last_name', $lname);
update_user_meta( $myuser_id, 'city', $city);
update_user_meta( $myuser_id, 'gender', $gender);
update_user_meta( $myuser_id, 'age', $age);


Requirements OF membership :
1.free member
2. Paid member

A user can be a paid member only after he registers as a free member.

So , now my doubts :?: are ,
1. if i set open register to yes, What will be the default user_role :? and how can i assign it dynamically in the form.
2. if a user registers as a free member and later pays through a generated paypal member button, will his userrole change to the required one automatically?



Waiting for reply from an expert..... :roll:

Re: 100% Custom Registration page with s2member integration

PostPosted: September 9th, 2010, 10:48 pm
by Jason Caldwell
Hi there. Thanks for the great questions.
1. if i set open register to yes, What will be the default user_role :? and how can i assign it dynamically in the form.

The default Role during a non-paid registration is Subscriber ( aka: Level #0 ). So if a public visitor registers for free, they go in as a Free Subscriber at Level #0. If you would like to change this, you could do something like this in your own custom routine:

Code: Select all
$new_user_id = wp_create_user( $uname, $password, $remail );
$new_user = new WP_User($new_user_id);
$new_user->set_role("s2member_level1"); 

Here are the different Role IDs.
Code: Select all
administrator
editor
author
contributor
subscriber
s2member_level1
s2member_level2
s2member_level3
s2member_level4

2. if a user registers as a free member and later pays through a generated paypal member button, will his userrole change to the required one automatically?

Yes, s2Member will handle this automatically.
Their Role will be updated automatically after checkout, and they'll be asked to log back in again.

Re: 100% Custom Registration page with s2member integration

PostPosted: September 12th, 2010, 5:13 pm
by geekz
:D Thanks a lot for the quick reply Jason.
I didnt expected such a fast response. Thanks..

I have another small question.

Requirements :
    1. There will be two registration forms.
    2. First registration form is for free members and can be accessed by anyone.
    3. Second registration form is for paid members and can be accessed only after making the payment through the paypal generated button.


Question
I am unable to make the second type of registration form.
I want the users to reach the registration page or be able to see the registration page only after they make payment for the membership using the paypal button. Is there a way to do this???


Waiting for reply .... :roll:

Re: 100% Custom Registration page with s2member integration

PostPosted: September 13th, 2010, 6:27 am
by bluecafe
If you set up a paypal button with the specific member level that is available against payment the user should be redirected to the relevant registration page I think.

Re: 100% Custom Registration page with s2member integration

PostPosted: September 13th, 2010, 10:52 am
by geekz
But i already have a custom registration page.
I want to create another for paid members and only after successful paypal transaction they can see this registration page.

Still Unresolved Problem :



Requirements :

    1. There will be two registration forms.

    2. First registration form is for free members and can be accessed by anyone.

    3. Second registration form is for paid members and can be accessed only after making the payment through the paypal generated button.



Question
I am unable to make the second type of registration form.
I want the users to reach the registration page or be able to see the registration page only after they make payment for the membership using the paypal button. Is there a way to do this???

Re: 100% Custom Registration page with s2member integration

PostPosted: September 29th, 2010, 2:24 pm
by Jason Caldwell
Hi there. Thanks for the great question.

Yes, please turn Open Registration: off
s2Member -> General Options -> Open Registration

Then, all you need to do is check register access before displaying your custom form.
Code: Select all
if(ws_plugin__s2member_check_register_access()){
    // display form
} 

Re: 100% Custom Registration page with s2member integration

PostPosted: March 4th, 2011, 7:38 am
by go4sachin007
I just wanna put my point please help and thanks in advance

I have installed s2member plugin and i have rquirement like as goes
I want two user type one is user which is default subscriber and free and
other user type is publishers which must be s2member_level1 and also free

so for subscriber the url run as http://example.com/wp-login.php?action=register
and for s2member_level1 some page runs and in this i called a template for my custome coding in which we can put the code for the registering member.
url goes for it as http://example.com/membership/
through this code viewer goes to paypal BUT i dont want like this I want that if a customer comes in this link, then a simple registration form open with customised fields that i set in setting for s2member_level1 and registered in database as s2member_level1 user.

Is this possible and if possible than please help via code


If somebody understand what i want to say then please help


regards
sachin

Re: 100% Custom Registration page with s2member integration

PostPosted: August 11th, 2011, 4:08 pm
by Sayhellotoryan
go4sachin007 wrote:I just wanna put my point please help and thanks in advance

I have installed s2member plugin and i have rquirement like as goes
I want two user type one is user which is default subscriber and free and
other user type is publishers which must be s2member_level1 and also free

so for subscriber the url run as http://example.com/wp-login.php?action=register
and for s2member_level1 some page runs and in this i called a template for my custome coding in which we can put the code for the registering member.
url goes for it as http://example.com/membership/
through this code viewer goes to paypal BUT i dont want like this I want that if a customer comes in this link, then a simple registration form open with customised fields that i set in setting for s2member_level1 and registered in database as s2member_level1 user.

Is this possible and if possible than please help via code


If somebody understand what i want to say then please help


regards
sachin


Hi did you ever figure out how to do this?