Community Support Forums — WordPress® ( Users Helping Users ) — 2011-02-15T05:15:52-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=934 2011-02-15T05:15:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=934&p=6737#p6737 <![CDATA[Re: Free Registration @ Different Levels]]>
I've changed the code in functions.php to

Code:
add_action("init", "register_level");
function register_level(){
  if($_GET["register_level"]){
    $link = ws_plugin__s2member_register_link_gen ("-", $_SERVER["HTTP_HOST"], "4:1D", false);
    wp_redirect($link);
    exit;
  }
}


and the link in wp is
Code:
http://localhost/wordpress/?register_level=4


But when I sign up a test user, they show up as a "subscriber" in the users list instead of as a "S2Member Level 4"

I think I've got a syntax error in function register_level() code.... does anyone know how to code it so it works?

Thanks

Kym

Statistics: Posted by stowe39 — February 15th, 2011, 5:15 am


]]>
2010-12-12T15:37:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=934&p=5089#p5089 <![CDATA[Re: Free Registration @ Different Levels]]>
Please help me!

Statistics: Posted by x3000gold — December 12th, 2010, 3:37 pm


]]>
2010-11-30T06:14:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=934&p=4913#p4913 <![CDATA[Re: Free Registration @ Different Levels]]>
Very good example, thank you!

Statistics: Posted by SantiAzpi — November 30th, 2010, 6:14 am


]]>
2010-11-30T04:28:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=934&p=4912#p4912 <![CDATA[Re: Free Registration @ Different Levels]]>
This solved my problem! Im sooo glad :)

Statistics: Posted by x3000gold — November 30th, 2010, 4:28 am


]]>
2010-10-05T14:52:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=934&p=3774#p3774 <![CDATA[Re: Free Registration @ Different Levels]]>
Thank you!

Statistics: Posted by jhg03 — October 5th, 2010, 2:52 pm


]]>
2010-10-02T12:11:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=934&p=3714#p3714 <![CDATA[Re: Free Registration @ Different Levels]]> Inside the functions.php file for your WordPress® theme, insert a snippet like this:
Code:
add_action("init""register_level");
function 
register_level(){
    if(
$_GET["register_level"]){
        
$link ws_plugin__s2member_register_link_gen ("-"$_SERVER["HTTP_HOST"], $_GET["register_level"], false);
        
wp_redirect($link);
        exit;
    }
}   

Here are how the actual links would be formulated:
Code:
http://example.com/?register_level=1
http://example.com/?register_level=2
http://example.com/?register_level=3
http://example.com/?register_level=4

Statistics: Posted by Jason Caldwell — October 2nd, 2010, 12:11 pm


]]>
2010-10-02T12:11:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=934&p=3713#p3713 <![CDATA[Free Registration @ Different Levels]]> s2Member deals with Levels [0-4]. These Levels are detected automatically during Registration. In other words, the Registration Form is adjusted automatically, based on the Level that a Customer purchases access to. As of s2Member v3.2.7+, you can also configure Custom Fields at different Levels, so the Registration Form will change in appearance if/when you have different Fields configured.

Now, if it's a free Registration, s2Member always defaults to Level # 0 ( a Free Subscriber ). So this works perfectly. However, in some cases, you may wish to offer Free Membership at multiple/different Levels, instead of Level #0 by itself. Since s2Member expects Levels 1-4 to be "paid for", you will have to link to the Registration Form in a more "advanced way" if you intend to offer these Levels [1-4] for free.

You can use this function to create a link that will allow "Paid Registration Access" for "Free" instead of requiring a Customer to go through PayPal®. This same function is often used by other gateways providers that intend to interface with s2Member, so you can adapt this to your situation; as needed.

Code:
$link = ws_plugin__s2member_register_link_gen
($subscr_id, $custom, $item_number, $shrink);  

$subscr_id = the paid transaction ID, or just a dash (-) if there was no transaction.
$custom = $_SERVER["HTTP_HOST"] ( must match the domain hosting the s2Member installation )
$item_number = 1,2,3 or 4 ( the Level number that a Customer will go in as during registration )
$shrink = ( false ) return the URL in full format, or ( true / return a tinyURL for emailing ).


Sending a Customer to the link produced by this function, will ultimately set three encrypted cookies, that s2Member will read in automatically, and ALLOW registration temporarily ( one time ).

Additional details ( optional ).

$item_number could also include
Custom Capabilities, and/or a fixed term length.

$item_number = 1,2,3, or 4
-- OR --
$item_number = level:custom capabilities:fixed term
( ex: 1:music,videos:1 M )

Which means:
Level #1 access, + music,videos as Custom Capabilities - account expires in 1 month.

Statistics: Posted by Jason Caldwell — October 2nd, 2010, 12:11 pm


]]>