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™

Redirect Upon Registration...

s2Member Plugin. A Membership plugin for WordPress®.

Redirect Upon Registration...

Postby godrob » October 26th, 2011, 10:02 am

Hi guys,

I'm using the the pro form to bring new members in at level 1 on a 14 day free trial. This all works fine. However, after they have filled out the registration form, a hidden div appears saying
Thank you. Please login.


What I want to happen instead, is for new members to automatically be redirected to a new page, immediately after registration, rather than the hidden
Thank you. Please login
. div appear on the registration form.

I thought I could do this simply by adding a redirect in s2member-pro "paypal-responses.inc.php", but in doing so, I think it no longer registers new users properly, as the first and last names are no longer populated in the Dashboard, and also the "Display name publicly as" doesn't update any more...

Here's the section of code with the bad redirect:

Code: Select all
   /**
            * Creates response divs after Registration processing.
            *
            * @package s2Member\PayPal
            * @since 1.5
            *
            * @param array $attr An array of Pro Form Attributes.
            * @return array An array of response details.
            */
            public static function paypal_registration_response ($attr = FALSE)
               {
                  $_response = $GLOBALS["ws_plugin__s2member_pro_paypal_registration_response"];
                  /**/
                  $_response = (!$_response) ? c_ws_plugin__s2member_pro_paypal_responses::paypal_form_attr_validation_errors ($attr) : $_response;
                  /**/
                  if ($_response && ($error = $_response["error"])) /* Error reporting. */
                     {
                        $response = '<div id="s2member-pro-paypal-form-response" class="s2member-pro-paypal-form-response-error s2member-pro-paypal-registration-form-response-error">';
                        $response .= $_response["response"];
                        $response .= '</div>';
                     }
                  else if ($_response) /* Otherwise, we treat this as an informational response. */
                     {
                        $response = '<div id="s2member-pro-paypal-form-response" class="s2member-pro-paypal-form-response-info s2member-pro-paypal-registration-form-response-info">';
                        $response .= $_response["response"];
                        $response .= '</div>';
                        wp_redirect( '/activate-your-account/' );
                     }
       /**/


Can somebody please tell me the right way of doing this please?

All I want to do is automatically send them to a page, after registration, telling them to check their email to activate their account. Which is basically just an aweber confirmation email.

Thanks
Rob.
Last edited by godrob on October 26th, 2011, 11:02 am, edited 1 time in total.
User avatar
godrob
Registered User
Registered User
 
Posts: 33
Joined: August 26, 2011

Re: Redirect Upon Registration...

Postby Eduan » October 26th, 2011, 10:15 am

Have you tried one-time-offers?
You'll find them under WP Admin -> s2Member -> General Options -> Optional One-Time-Offers ( Upon Login ).

Hope this is what you're looking for. :)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Redirect Upon Registration...

Postby godrob » October 26th, 2011, 10:32 am

Yes, thanks Eduan, I was going to use that as last resort. The OTO obviously requires the user to login first though. What I wanted was the user to be redirected immediately after completing registration, before actually logging in.

Any ideas?

Thanks
Rob.
User avatar
godrob
Registered User
Registered User
 
Posts: 33
Joined: August 26, 2011

Re: Redirect Upon Registration...

Postby Eduan » October 26th, 2011, 10:38 am

Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Redirect Upon Registration...

Postby godrob » October 26th, 2011, 10:42 am

Yes, pretty much, this is what I'm using which redirects after registration:

wp_redirect( '/activate-your-account/' );

This redirects just fine, BUT somehow breaks the input of some fields (see above)...

Thanks
Rob.
User avatar
godrob
Registered User
Registered User
 
Posts: 33
Joined: August 26, 2011

Re: Redirect Upon Registration...

Postby Cristián Lávaque » October 26th, 2011, 11:20 pm

You can use the success attribute in the pro-form's shortcode. WP Admin -> s2Member -> PayPal Pro-Forms -> Custom Return URLs On Success

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: Redirect Upon Registration...

Postby godrob » October 27th, 2011, 5:42 am

Thanks Cristian!
User avatar
godrob
Registered User
Registered User
 
Posts: 33
Joined: August 26, 2011

Re: Redirect Upon Registration...

Postby Cristián Lávaque » October 27th, 2011, 10:26 pm

No problem. :)
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: No registered users and 1 guest

cron