Page 1 of 1

Custom registration form

PostPosted: September 23rd, 2010, 2:23 pm
by geekz
I already have a custom registration page.
I want to create another form for registration of 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: Custom registration form

PostPosted: September 25th, 2010, 3:24 am
by geekz
Finally, i got the solution..
I dug into the codes and found the best solution.


Here is the code to check if the user has made payment or not. If paid, it will set role of Leve 4 , else Level 1.

If anyone wants complete register page code, just let me know. i can help you.
Thanks a lot S2 member Team. You folks made it easier. Thanks a lot.

Code: Select all
$myuser_id = wp_create_user( $uname, $password, $remail );
if($myuser_id){
$new_user = new WP_User($myuser_id);
if(ws_plugin__s2member_check_register_access()){$new_user->set_role("s2member_level4");
echo 'You have successfully registered as Paid member :)'; }
else{$new_user->set_role("s2member_level1");
echo 'You have successfully registered as Free Member.. :)';
}
}


Re: Custom registration form

PostPosted: February 27th, 2011, 3:51 am
by adrianlee
Hi Geekz,
can you tell where this code should go and in which file?
Also should there be one registration page or another one for paid members?

Would really appreciate your help. My membership is almost ready except for this.