Community Support Forums — WordPress® ( Users Helping Users ) — 2011-05-23T22:53:20-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6530 2011-05-23T22:53:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15735#p15735 <![CDATA[Re: Registration Disabled]]> /wp-signup.php in the same way it protects /wp-login.php?action=register on a standard installation. If Open Registration is off ( i.e. do NOT allow Open Registration ), then your /wp-signup.php file should unavailable to non-paying Customers. However, if you are logged-in as an Administrator, *you* will be able to see it.

Statistics: Posted by Jason Caldwell — May 23rd, 2011, 10:53 pm


]]>
2011-05-23T22:41:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15733#p15733 <![CDATA[Re: Registration Disabled]]> Statistics: Posted by thuynh — May 23rd, 2011, 10:41 pm


]]>
2011-05-23T19:21:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15710#p15710 <![CDATA[Re: Registration Disabled]]>

So the flow is this. We have a sale site on eznichebuilder.com sitting on a separate Single WP installation. Users click on Buy Now from this site and get sent to Clickbank. Upon payment completion, user is sent to eznichepages.com which is where the s2member lives. eznichepages.com is the main site of the farm. You can see the button on http://www.eznichebuilder.com/buy-now/. After users come back from Clickbank, s2member set cookies then the hook ws_plugin__s2member_during_paypal_return_during_subscr_signup_wo_update_vars will send them back to eznichebuilder.com/thank-you. This is one of clickbank's requirement so we had to send users back to the sale site. From the sale site, there's a link to go back to eznichepages.com to register.

This link simply points to http://eznichepages.com/wp-login.php?action=register.

Since cookies are already set, s2member should be able to pick it up and continue. However, it just says Registration disabled. Without that ==, it won't work.

On a Multisite installation, if you configure s2Member to run as a Blog Farm ( i.e. s2Member -> Mulitisite (Config) ), then s2Member locks down /wp-login.php?action=register completely, and instead, you must use the Multisite Registration Form for WordPress instead ( /wp-signup.php ). So just change your custom redirection to point to /wp-signup.php, or change your s2Member -> Multisite ( Config ) options to unlock /wp-login.php?action=register

Statistics: Posted by Jason Caldwell — May 23rd, 2011, 7:21 pm


]]>
2011-05-23T19:16:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15709#p15709 <![CDATA[Re: Registration Disabled]]>
thuynh wrote:
Line 103:
return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register = "0"), get_defined_vars ());

Shouldn't this be:
return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register == "0"), get_defined_vars ());

Line 110:
return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register = "1"), get_defined_vars ());

Shouldn't this be:
return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register == "1"), get_defined_vars ());
Cristián Lávaque wrote:
The value is being assigned, not compared, so = is fine.
Cristián is correct. The value is being assigned, not compared.
So the existing code with just one = sign is correct.

I will reply about the issue detailed here momentarily.

Statistics: Posted by Jason Caldwell — May 23rd, 2011, 7:16 pm


]]>
2011-05-23T16:11:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15679#p15679 <![CDATA[Re: Registration Disabled]]>
When the person returns from ClickBank to eznichepages.com, I'm using the following code to send them over to eznichebuilder.com.

Code:
add_action ('ws_plugin__s2member_during_paypal_return_during_subscr_signup_wo_update_vars', 'clickbank_handler');
function clickbank_handler() {
   echo '<script type="text/javascript">' . "\n";
   echo "window.location = 'http://www.eznichebuilder.com/thank-you?full_name=".$_REQUEST['first_name']." ".$_REQUEST['last_name']."&email=".$_REQUEST['payer_email']."';";                           
   echo '</script>' . "\n";   
   exit();
}


This page has nothing more than just a message. Like I mention, Clickbank requires a thank you page in order to have the product approved.

As for the www vs non-www, everything on eznichepages.com should be non-www. However, eznichebuilder.com is www. I don't think that should matter since cookies are set for eznichepages.com right?

I guess it's not a good idea to change = to ==.

Statistics: Posted by thuynh — May 23rd, 2011, 4:11 pm


]]>
2011-05-23T15:59:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15677#p15677 <![CDATA[Re: Registration Disabled]]>
So you have the sales page over at www.eznichebuilder.com but all the ClickBank set up is done with eznichepages.com (where the user's account will be) or did you mix them in the configuration?

When the person returns from ClickBank to eznichepages.com how are you taking him back to www.eznichebuilder.com?

Also, since you use www in one and not in the other, I think it may be good that you keep this in mind, just in case: http://www.primothemes.com/forums/viewtopic.php?f=36&t=1066

By the way, the change you made to the code seems to have opened registrations because I went to the registration form and was able to create an account without a stop. (You can delete the account I created, of course.)

Statistics: Posted by Cristián Lávaque — May 23rd, 2011, 3:59 pm


]]>
2011-05-23T15:18:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15674#p15674 <![CDATA[Re: Registration Disabled]]> http://www.eznichebuilder.com/buy-now/. After users come back from Clickbank, s2member set cookies then the hook ws_plugin__s2member_during_paypal_return_during_subscr_signup_wo_update_vars will send them back to eznichebuilder.com/thank-you. This is one of clickbank's requirement so we had to send users back to the sale site. From the sale site, there's a link to go back to eznichepages.com to register. This link simply points to http://eznichepages.com/wp-login.php?action=register. Since cookies are already set, s2member should be able to pick it up and continue. However, it just says Registration disabled. Without that ==, it won't work.

Here is clickbank-rtn.log

Code:
eznichepages.com/?s2member_pro_clickbank_return=1&item=1&cbreceipt=XXXXXX&time=1306167574&cbpop=XXXXXX&cbaffi=0&cname=XXXXXX&cemail=XXXXXX&ccountry=US&czip=Zipcode&s2_invoice=1&s2_desc=EZNicheBuilder+Content+Site+Builder+++Unique+Articles&s2_custom=eznichepages.com
array (
  'item' => '1',
  'cbreceipt' => 'XXXXXX',
  'time' => '1306167574',
  'cbpop' => 'XXXXX',
  'cbaffi' => '0',
  'cname' => 'XXXXXX',
  'cemail' => 'XXXXXX',
  'ccountry' => 'US',
  'czip' => 'XXXXXX',
  's2_invoice' => '1',
  's2_desc' => 'EZNicheBuilder Content Site Builder   Unique Articles',
  's2_custom' => 'eznichepages.com',
  's2member_log' =>
  array (
    0 => 'Return-Data received on: Mon May 23, 2011 7:45:54 pm UTC',
    1 => 's2Member POST vars verified with ClickBank®.',
    2 => 'Sleeping for 5 seconds. Giving ClickBank® a chance to finalize processing.',
    3 => 'Awake. It\'s Mon May 23, 2011 7:45:59 pm UTC. Processing will continue.',
    4 => 'Order API variables have been obtained from ClickBank®.',
    5 => 'ClickBank® transaction identified as (SALE/STANDARD).',
    6 => 'Return-Data reformulated. Piping through s2Member\'s core/standard PayPal® processor as txn_type (web_accept).',
    7 => 'Please check PayPal® RTN logs for further processing details.',
    8 => 'http://eznichepages.com/?s2member_paypal_return=1&s2member_paypal_proxy=s2member-pro-module&s2member_paypal_proxy_use=standard-emails&s2member_paypal_proxy_verification=XXXXXXX&txn_type=web_accept&txn_id=XXXXXX&custom=eznichepages.com&mc_gross=XXXXX&mc_currency=USD&tax=0.00&payer_email=XXXXXX&first_name=XXXXXX&last_name=XXXXXX&option_name1&option_selection1&item_number=1&item_name=EZNicheBuilder+Content+Site+Builder+++Unique+Articles',
  ),
  's2vars' =>
  array (
    's2_invoice' => '1',
    's2_desc' => 'EZNicheBuilder Content Site Builder   Unique Articles',
    's2_custom' => 'eznichepages.com',
  ),
)


paypal-rtn.log
Code:
eznichepages.com/?s2member_paypal_return=1&s2member_paypal_proxy=s2member-pro-module&s2member_paypal_proxy_use=standard-emails&s2member_paypal_proxy_verification=XXXXXX&txn_type=web_accept&txn_id=XXXXXX&custom=eznichepages.com&mc_gross=XXXXXX&mc_currency=USD&tax=0.00&payer_email=XXXXXX&first_name=XXXXXX&last_name=XXXXXX&option_name1&option_selection1&item_number=1&item_name=EZNicheBuilder+Content+Site+Builder+++Unique+Articles
array (
  'txn_type' => 'web_accept',
  'txn_id' => 'XXXXXX',
  'custom' => 'eznichepages.com',
  'mc_gross' => 'XXXXXX',
  'mc_currency' => 'USD',
  'tax' => '0.00',
  'payer_email' => 'XXXXXX',
  'first_name' => 'XXXXXX',
  'last_name' => 'XXXXXX',
  'option_name1' => '',
  'option_selection1' => '',
  'item_number' => '1',
  'item_name' => 'EZNicheBuilder Content Site Builder   Unique Articles',
  'proxy_verified' => 's2member-pro-module',
  's2member_log' =>
  array (
    0 => 'Return-Data received on: Mon May 23, 2011 6:43:48 pm UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( _SERVER[HTTP_HOST] ) validated.',
    3 => 's2Member txn_type identified as (web_accept|subscr_signup|subscr_payment).',
    4 => 's2Member txn_type identified as (web_accept|subscr_signup|subscr_payment) w/o update vars.',
    5 => 'Registration Cookies set on (web_accept|subscr_signup|subscr_payment) w/o update vars.',
    6 => 'Redirecting Customer to Registration Page. They need to Register now.',
  ),
  'subscr_id' => 'XXXXXX',
  'eotper' => NULL,
  'ccaps' => NULL,
  'level' => '1',
  's2member_paypal_proxy' => 's2member-pro-module',
  's2member_paypal_proxy_use' => 'standard-emails',
  's2member_paypal_proxy_verification' => 'XXXXXX',
)

Statistics: Posted by thuynh — May 23rd, 2011, 3:18 pm


]]>
2011-05-23T14:59:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15672#p15672 <![CDATA[Re: Registration Disabled]]>
OK, so you have a multiste network set up, but you're selling this from the main blog, and when the person comes back, although it's the URL that s2Member asked for the return and the cookies are set, the person is not allowed to register?

Statistics: Posted by Cristián Lávaque — May 23rd, 2011, 2:59 pm


]]>
2011-05-23T14:47:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15670#p15670 <![CDATA[Re: Registration Disabled]]>
http://XXXXXX.com/?s2member_pro_clickbank_return=1&item=1&cbreceipt=GKYW70NEPF4&time=1306167574&cbpop=11C00950&cbaffi=0&cname=Thai+Huynh&cemail=me%40thaihuynh.com&ccountry=US&czip=78660&s2_invoice=1&s2_desc=Some+Description&s2_custom=XXXXXX.com

This is the URL that got returned.

Statistics: Posted by thuynh — May 23rd, 2011, 2:47 pm


]]>
2011-05-23T14:38:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15668#p15668 <![CDATA[Re: Registration Disabled]]> apply_filters function being called. So you don't need to worry about = being a typo instead of ==. :)

I'm glad you got your registrations to work. How did you solve it?

Statistics: Posted by Cristián Lávaque — May 23rd, 2011, 2:38 pm


]]>
2011-05-23T13:52:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15660#p15660 <![CDATA[Re: Registration Disabled]]>
s2member_subscr_id
s2member_level
s2member_custom

When users click on register from my thank you page, they're sent to /wp-login.php?action=register. There's a code in the wp-login.php that checks get_option('users_can_register') which then land on this method in s2member ws_plugin__s2member_check_register_access. Inside this method, there's a check:

Code:
$by_default = $users_can_register = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"];


The variable $users_can_register is set to 0 for me.

So when it hits the first check:

Code:
if (is_multisite () && ws_plugin__s2member_is_multisite_farm () && is_main_site ())
               return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register = "0"), get_defined_vars ());


The assignment basically just set it to false every time. Please shed some lights.

Statistics: Posted by thuynh — May 23rd, 2011, 1:52 pm


]]>
2011-05-23T13:37:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15657#p15657 <![CDATA[Re: Registration Disabled]]>
So your problem is that users complete checkout in ClickBank and get sent to /wp-login.php?action=register? That return URL is wrong, though, it should be http://yoursite.com/?s2member_pro_clickbank_return=1 so s2Member creates the cookies required to let the person register the account.

If you need customers to land on a custom thank-you page, you can have the cookies created with this hack:

Create the directory/file /wp-content/mu-plugins/s2hacks.php (mu: must use) and add this code (no spaces or new lines before the <?php or after ?>)

Code:
<?php
add_action ('ws_plugin__s2member_during_paypal_return_during_subscr_signup_wo_update_vars', 'my_clickbank_return');
function my_clickbank_return () {
    if ($_REQUEST['s2member_paypal_proxy'] === 'clickbank') {
        echo '<script type="text/javascript">' . "\n";
        echo "window.location = 'http://yoursite.com/custom-thankyou';" . "\n";
        echo '</script>' . "\n";
        /*
        Note. Don't use wp_redirect() or header("Location: xxx") here.
        The cookies set by s2Member may not be read properly.
        Always use window.location = ''; ( as shown above ).
        */
        exit ();
    }
}
?>


I hope it helps. :)

Statistics: Posted by Cristián Lávaque — May 23rd, 2011, 1:37 pm


]]>
2011-05-23T12:46:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6530&p=15650#p15650 <![CDATA[Registration Disabled]]>
Also, while digging through the s2member code, I did notice something and was hoping that this is correct. In the file /s2member/includes/function/force-options.inc.php.

Line 103:
return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register = "0"), get_defined_vars ());

Shouldn't this be:
return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register == "0"), get_defined_vars ());

Line 110:
return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register = "1"), get_defined_vars ());

Shouldn't this be:
return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register == "1"), get_defined_vars ());

Thanks

Statistics: Posted by thuynh — May 23rd, 2011, 12:46 pm


]]>