Page 1 of 1

Custom return page

PostPosted: September 19th, 2011, 11:29 am
by reallysimpleseo
Hi there,
I've got a lot of free content on my site that I want visitors to pass through a PalPal pro free form (at level 0) to get to. So they would read the fist paragraph or so, then need register with PayPal free form, then be redirected back to the same page (free content page they were on before) once they have logged in.

I'm not sure how to do this but I think I would use success="" on the form to take them to a Pro Login Widget as a PHP Tag on a page set to redirect to %%previous%%. Is this the right way to do this or is there a simpler way?

If it is the right way I can get the <?php echo s2member_pro_login_widget(); ?> to work on a page, but have no idea how to include the "login_redirect" => "" %%previous%% as I'm no php programmer.

Any advice would be much appreciated.

Re: Custom return page

PostPosted: September 19th, 2011, 9:44 pm
by Cristián Lávaque
%%previous%% would not be available in the free registration pro-form. WP Admin -> s2Member -> PayPal Pro-Forms -> Custom Return -> Free Registration

You could use $_SERVER['REQUEST_URI'] to populate the current page's URL in the success attribute, though. viewtopic.php?f=36&t=1604

I hope that helps. :)

Re: Custom return page

PostPosted: September 20th, 2011, 4:04 am
by reallysimpleseo
Cristián Lávaque wrote:%%previous%% would not be available in the free registration pro-form. WP Admin -> s2Member -> PayPal Pro-Forms -> Custom Return -> Free Registration

You could use $_SERVER['REQUEST_URI'] to populate the current page's URL in the success attribute, though. viewtopic.php?f=36&t=1604

I hope that helps. :)
Yes, this is most helpful thanks.

Re: Custom return page

PostPosted: September 20th, 2011, 4:49 pm
by Cristián Lávaque
Great. :)