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™

Registration Page with multiple options

s2Member Plugin. A Membership plugin for WordPress®.

Registration Page with multiple options

Postby drbyte » July 21st, 2011, 11:51 am

Hi Guys

The registration page which is the default membership options page for s2m

Now inside this page we have:

Code: Select all
<input type="radio" onclick="window.location='https://www.site.com/signup-m-3?s2member_level_req=1';" />$4.95 - 3 Day Trial
<input type="radio" onclick="window.location='https://www.site.com/signup-m-30r?s2member_level_req=1';" />$15.95 - 30 Days membership [Recurring]


Now not sure of what I did is correct. I added ?s2member_level_req=1 at the end of the url above. Is that the correct way or just leave it blank for a default level 1 option. meaning https://www.site.com/signup-m-30r

Thank you
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Registration Page with multiple options

Postby Cristián Lávaque » July 21st, 2011, 3:51 pm

I didn't understand what you're trying to do. Where is that code you quoted? Do you mean having a registration form in the Membership Options Page? Please explain it with more detail. Thanks! :)
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: Registration Page with multiple options

Postby drbyte » July 21st, 2011, 10:45 pm

Thanks Cris

I did test it and it's working fine. The question came to me to as they are reading this:

"This special Page is where you will insert the PayPal® Subscription Buttons generated for you by s2Member. This Page serves as your signup page. It should detail all of the features that come with Membership to your site, and provide a PayPal® Subscription Button for each Level of access you plan to offer."

On the signup page, they are asking if they can have multiple check box option where visitors can choose and where each page holds some information about what is requested, instead of having everthing on one page.

They thought that it's a mandatory to have the PayPal button in there. The site have only one level. My only concern was that if I do not add ?s2member_level_req=1 to the end of the page requested ..the application will fail. But i suppose it does not matter if you serve only one level.

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Registration Page with multiple options

Postby Cristián Lávaque » July 21st, 2011, 11:12 pm

Ah, I see. Well, you can put whatever you want in the Membership Options Page. The idea is that if that's where people get sent when bounced from restricted content, you may want to sell them the access to it there. The s2member_level_req var is added by s2Member, you don't need to add it yourself.

Does that answer your questions?
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: Registration Page with multiple options

Postby drbyte » July 21st, 2011, 11:40 pm

thanks Cris. it does
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Registration Page with multiple options

Postby Cristián Lávaque » July 21st, 2011, 11:57 pm

Great. :)
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: Registration Page with multiple options

Postby drbyte » July 23rd, 2011, 12:15 am

Hi Cris

Well I'm almost there but having problem hooking couple of things together

here's what i'm trying to do

On the signup page I have this:

Code: Select all
<form id="s2member-pro-paypal-checkout-form" class="s2member-pro-paypal-form s2member-pro-paypal-checkout-form" method="post" action="what goes in here?">
<div style="margin-top: 12px;" class="jn_frm_lft_btn">
<div id="s2member-pro-paypal-checkout-form-email-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-checkout-form-div s2member-pro-paypal-form-email-div s2member-pro-paypal-checkout-form-email-div">
<label for="s2member-pro-paypal-checkout-email" id="s2member-pro-paypal-checkout-form-email-label" class="s2member-pro-paypal-form-email-label s2member-pro-paypal-checkout-form-email-label">
<span>Email Address *</span><br />
<input aria-required="true" data-expected="email" type="text" maxlength="100" name="s2member_pro_paypal_checkout[email]" id="s2member-pro-paypal-checkout-email" class="s2member-pro-paypal-email s2member-pro-paypal-checkout-email" value="" tabindex="30" />
</label>
</div>
<input type="submit" id="s2member-pro-paypal-checkout-submit" class="s2member-pro-paypal-submit s2member-pro-paypal-checkout-submit" value="Submit Form" tabindex="510" />


The Code above will capture the email address and forward it to the registration form but I also have this on the signup page:


The code below i gave some values but not sure how to pass them to the original submit form
Code: Select all

<label><input name="cascadeId" value="8000" checked="true" type="radio" />$4.95 - 3 DAY ACCESS</label>
<br>
<label><input name="cascadeId" value="8001" type="radio" />$15.95 - 30 DAYS MEMBERSHIP/Recurring <span style="color: darkorange; font-weight: bold;">[ SAVE 33% ]</span></label>
<br>
<label><input name="cascadeId" value="8002" type="radio" />$31.95 - 30 DAYS MEMBERSHIP [Non-Recurring]</label>



Now, how do I connect the first form to add what the visitor choose from the last form!!!

Now I know the action is not correct. What would be the correct setting for that

Then I am using the JS

Code: Select all
<script type="text/javascript">
function get_radio_value()
{
for (var i=0; i < document.orderform.cascadeId.length; i++)
   {
   if (document.orderform.music[i].checked)
      {
      var rad_val = document.orderform.cascadeId[i].value;
      }
   }
}
</script>




I think i am missing the form action but I might be missing other things too

Thank you your help

Sam
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Registration Page with multiple options

Postby Jason Caldwell » July 27th, 2011, 6:40 pm

Thanks for the heads up on this thread.

Hi Sam.

If I understand correctly, I think you're trying to provide a list of options on your Membership Options Page, and based on the option they select, redirect to a different checkout form provided by s2Member Pro.

Normally you would do this by creating several s2Member Pro Form Shortcodes, and creating a separate Post or Page for each of them. This way you have a selection of different checkout URLs, where an s2Member Pro Form resides on each of those Posts or Pages that you created. When a customer chooses an option from your Membership Options Page, they really just need to be redirected to the proper Post or Page which holds the s2Member Pro Form Shortcode with the checkout configuration they selected.
Code: Select all
http://example.com/checkout-form-1 ( contains a Pro Form Shortcode )
http://example.com/checkout-form-2 ( contains a Pro Form Shortcode )
http://example.com/checkout-form-3 ( contains a Pro Form Shortcode )
* Or for the more advanced site owner, you might try an approach that uses variables in your Shortcode. See: viewtopic.php?f=36&t=1604

I have a feeling though, that you're trying to do something more than this? If so, can you please fill me in with a bit more detail please? I'm just not seeing the big picture yet I guess, sorry.
~ 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: Registration Page with multiple options

Postby drbyte » July 28th, 2011, 2:59 am

Hi Jason

Thank you...Yes I am trying to do more than that, well if i am allowed to off course

here are some examples:

0003.jpg
0003.jpg (5.92 KiB) Viewed 215 times

0002.jpg
0002.jpg (6.48 KiB) Viewed 215 times

0001.jpg
0001.jpg (10.62 KiB) Viewed 215 times


These examples taken form different sites...What they do to make it more appealing is a short form when it's populated it passes the info to the PayPal Pro code.

Think of it like the log in widget but this is a membership widget. I suppose

I got it to work where it passes the info i gave to the Pro code but Only if the action of the form is set like ?s2member_level_req=1 which is
Code: Select all
action="?s2member_level_req=1"



but what I want to do is when the visitor click on one of the option below
Code: Select all
<label><input name="cascadeId" value="8000" checked="true" type="radio" />$4.95 - 3 DAY ACCESS</label>
<br>
<label><input name="cascadeId" value="8001" type="radio" />$15.95 - 30 DAYS MEMBERSHIP/Recurring <span style="color: darkorange; font-weight: bold;">[ SAVE 33% ]</span></label>
<br>
<label><input name="cascadeId" value="8002" type="radio" />$31.95 - 30 DAYS MEMBERSHIP [Non-Recurring]</label>


It captures the value of that option and pass it the Pro form along with the other fields like username or email address

How is that? So basically how do I set the %%action%% of the form manually?

Thank you
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Registration Page with multiple options

Postby Cristián Lávaque » July 28th, 2011, 2:33 pm

Couldn't you in the pro-form page, check the variable and adjust the pro-form's shortcode based on that? I tried this:

Code: Select all
if (isset($_GET['cascadeId'])) {
    switch ($_GET['cascadeId']) {
        case '8000':
            echo '[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="$4.95 USD / One Time ( for 3 day access, non-recurring, no trial )" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="example.com" ta="0" tp="0" tt="D" ra="4.95" rp="3" rt="D" rr="BN" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]';
            break;
        case '8001':
            echo '[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="$15.95 USD / Monthly ( recurring charge, for ongoing access )" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="example.com" ta="0" tp="0" tt="D" ra="15.95" rp="1" rt="M" rr="1" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]';
            break;
        case '8002':
            echo '[s2Member-Pro-PayPal-Form level="1" ccaps="" desc="$31.95 USD / One Time ( for 1 month access, non-recurring )" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="example.com" ta="0" tp="0" tt="D" ra="31.95" rp="1" rt="M" rr="0" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]';
            break;
    }
}
 


The problem is that WordPress' shortcode parser seems confused when there's more than one pro-form in the page, although only one is really echoed.

You can instead define the values for the shortcode and then echo just one shortcode with all the values adjusted depending on the cascadeId value.
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: Registration Page with multiple options

Postby drbyte » July 29th, 2011, 12:07 am

Hi Cris

Thank you..the code should work but the only thing i am missing is the form action.

Here are the steps:

on the per-signup page they enter:

email address
password

choose a membership option

Next Step

on the PayPal Pro form page

the email address, password and the membership option is populated from the previous step. all they have to do is complete the form and submit for approval.

the form action:

from step 1

<form id="s2member-pro-paypal-checkout-form" class="s2member-pro-paypal-form s2member-pro-paypal-checkout-form" method="post" action="??????????????">
box.jpg
box.jpg (23.18 KiB) Viewed 209 times
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Registration Page with multiple options

Postby Cristián Lávaque » July 29th, 2011, 3:42 pm

Got it. OK, here's an idea:

Use the free registration pro-form, don't require First or Last name, you will need email address though so they'll be three fields in the first form unless you don't ask for password and let WordPress send that in the welcome email. WP Admin -> s2Member -> General Options -> Custom Registration Fields/Options -> Collect First/Last Names during Registration and Allow Custom Passwords during Registration

In addition to those, create a custom field with radio buttons for the plan they'll purchase. This will add it to the registration form with no pain, and you can remove it from his account after payment. WP Admin -> s2Member -> General Options -> Custom Registration Fields/Options

Now, using the hack to autologin after registration, send the person to your payment pro-form for the plan they selected before, which will be populated with the profile fields they registered with. viewtopic.php?f=4&t=14211#p29101
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


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron