|
The Pro account is under my clients name that I do not have access to..
|
|
what else do i need to add/change?
Didn’t work like this..
<?php
$user_id = get_current_user_id();
$custom_fields = get_user_option('s2member_custom_fields', $user_id);
$custom_fields['teacher_search'] = esc_html($_POST['s2member_pro_paypal_registration']['custom_fields']['teacher_search']);
update_user_option($user_id, 's2member_custom_fields', $custom_fields);
if (is_page('teacher-registration' || 'supporting-member-registration')) { ?>
<div id="s2member-pro-paypal-checkout-form-teacher-search-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-checkout-form-div s2member-pro-paypal-form-teacher-search-div s2member-pro-paypal-checkout-form-teacher-search-div">
<label for="s2member-pro-paypal-checkout-teacher-search" id="s2member-pro-paypal-checkout-form-teacher-search-label" class="s2member-pro-paypal-form-teacher-search-label s2member-pro-paypal-checkout-form-teacher-search-label">
<span>Public Teacher Search *</span><br />
<span style="font-weight:normal;font-style:italic;">Be sure to select if you want your information 'Public' or 'Private' from the Teacher Search page.</span><br />
<input type="radio" value="public" name="s2member_pro_paypal_checkout[custom_fields][teacher_search]" id="s2member-pro-paypal-checkout-custom-reg-field-teacher-search" aria-required="true" tabindex="100" class="s2member-pro-paypal-custom-reg-field-teacher-search s2member-pro-paypal-checkout-custom-reg-field-teacher-search" /> Public<span style="font-weight:normal;">; If you would like to be included in the public teacher search.</span><br />
<input type="radio" value="private" name="s2member_pro_paypal_checkout[custom_fields][teacher_search]" id="s2member-pro-paypal-checkout-custom-reg-field-teacher-search" aria-required="true" tabindex="101" class="s2member-pro-paypal-custom-reg-field-teacher-search s2member-pro-paypal-checkout-custom-reg-field-teacher-search" /> Private<span style="font-weight:normal;">; If you do NOT want to be included in the public teacher search.</span>
</label>
</div>
<?php } ?>
EDIT
From the “if(is_page…” and down, it works for new user registers. adds the data correctly(without the additional php).
|
|
Though this should be fine…my client wants an input field (radio button option) on the checkout page.
I have created a custom field and created the html for the input. (custom field being ‘teacher-search’)
In the ‘paypal-checkout-form.php’ i added..
<?php if (is_page('teacher-registration')) { ?>
<div id="s2member-pro-paypal-registration-form-teacher-search-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-registration-form-div s2member-pro-paypal-form-teacher-search-div s2member-pro-paypal-registration-form-teacher-search-div">
<label for="s2member-pro-paypal-registration-teacher-search" id="s2member-pro-paypal-registration-form-teacher-search-label" class="s2member-pro-paypal-form-teacher-search-label s2member-pro-paypal-registration-form-teacher-search-label">
<span>Public Teacher Search *</span><br />
<span style="font-weight:normal;font-style:italic;">Be sure to select if you want your information 'Public' or 'Private' from the Teacher Search page.</span><br />
<input type="radio" value="public" name="s2member_pro_paypal_registration[custom_fields][teacher_search]" id="s2member-pro-paypal-registration-custom-reg-field-teacher-search" aria-required="true" tabindex="100" class="s2member-pro-paypal-custom-reg-field-teacher-search s2member-pro-paypal-registration-custom-reg-field-teacher-search" /> Public<span style="font-weight:normal;">; If you would like to be included in the public teacher search.</span><br />
<input type="radio" value="private" name="s2member_pro_paypal_registration[custom_fields][teacher_search]" id="s2member-pro-paypal-registration-custom-reg-field-teacher-search" aria-required="true" tabindex="101" class="s2member-pro-paypal-custom-reg-field-teacher-search s2member-pro-paypal-registration-custom-reg-field-teacher-search" /> Private<span style="font-weight:normal;">; If you do NOT want to be included in the public teacher search.</span>
</label>
</div>
<?php } ?>
Now, how do I connect this to the database so the users ‘radio’ selection gets saved?
|
|
Thank you for your reply.
So how would I use this if trying to implement an if statement like..
(wordpress eot date search)
if (wp_s2member_auto_eot_time >= “31 July 2014”) {
blah blah blah
}
global $wpdb;
$query = "SELECT `user_id`, `meta_value` FROM `wp_usermeta` WHERE `meta_key` = 'wp_s2member_auto_eot_time' AND `meta_value` != ''";
foreach($wpdb->get_results($query) as $result)
if (wp_s2member_auto_eot_time >= "31 July 2014" {
[do this action]
}
..would that be correct? lets say the action is sending an e-mail. would the e-mail send? (assuming the e-mail code is correct of course)
|
|
I am also interested in what Ben said.
My client has their EOT date set at a specific date and would like e-mail to be sent to the members 30, 60, and 90 days after their EOT has passed. (assuming they haven’t renewed their membership)
I installed WP Crontrol and would like to know what hook/script to add to the hook input to make this happen.
I already have the e-mail script setup. Just need the script that says ‘when’ to send the e-mail.
|
|
ok so I couldn’t get Bill’s EOT Notice hack to work for me..so instead i tried:
EOT Email notification (temporary solution)
This worked for me. Also used the ‘get key’ method for a little security.
Worked and got the e-mail to send right on EOT…but now I need 2-3 more notices sent in 30 day increments.
THIS one, I will need help with.
Using the EOT/Deletion Notice API in s2member, apparently you can add multiple notification URLs?
Wouldn’t this be possible to just use the same file and have the system send a notification like this..
EOT Notice, +30 days, +60 days, +90 days?
Anybody? Could really use some help here. Thanks.
EDIT
Doing some research and asking around, most of my responses were to plugin a cron event.
i installed WP Crontrol and could use some help on how to setup this +30, +60, +90 day notification.
Here’s a summary of whats going on..
My client wanted to set the EOT date to be July 31st. (done)
Assuming the ‘current date’ is after July 31st, I need the cron to check if a user’s EOT is still the current year.(if the user has already renewed their membership, the EOT year would have been change to the following year.)
If it is still the current year(and after July 31st) then if it’s 30, 60, or 90 days after the EOT date to send a membership renewal e-mail to the user.
|
|
The test hasn’t worked for me.
I set the EOT date to tomorrow at 1pm. Did the notification for 24 hours earlier..
Never got an e-mail.
Any suggestions?
Also, my client wants to send a notice three times, 30 days apart starting from EOT date. This possible?
|
|
figured it out..here’s what works if anyone else is interested in this…
First, you need to install the ‘PHP Execution’ plugin so you can put php code in the page content.
Create a page(or use an existing one), then make sure ‘Text’ is selected, not ‘Visual’, in the editor.
Add code..changing the date to whatever you need..
<?php
$now = strtotime("now");
$fixed_time = strtotime("31 July " . date("Y"));
if($now > $fixed_time)
$fixed_time = strtotime("+1 year", $fixed_time);
$days_until_fixed_time = round(($fixed_time - $now) / (86400));
?>
[s2member-Pro-PayPal-Form... tp="<?php echo $days_until_fixed_time; ?>" tt="D" ... /]
Be sure to include the full PayPal Pro form.
It was shortened above just to display what is needed to make the code work.
This will set the EOT date to July 31(or whatever date you want to change it to..).
If the user registers BEFORE the EOT date, the current year is used.
If the user registers AFTER the EOT date, the next year is used.
Enjoy.
|
|
would this work…?
<?php
$now = strtotime("now");
$fixed_time = strtotime("31 July " . date("Y"));
if($now > $fixed_time)
$fixed_time = strtotime("+1 year", $fixed_time);
$days_until_fixed_time = round(($fixed_time - $now) / ($seconds_in_one_day = $86400));
?>
[s2member-Pro-PayPal-Form... tp="<?php echo $days_until_fixed_time; ?>" tt="D" ... /]
|
|
found this s2member api debug log..
LOG ENTRY: Fri Mar 22nd, 2013 @ precisely 5:15 pm UTC
PHP v5.3.13 :: WordPress® v3.5.1 :: s2Member® v130221 :: s2Member® Pro v130221
Memory 16.99 MB :: Real Memory 17.50 MB :: Peak Memory 17.01 MB :: Real Peak Memory 17.50 MB
www.suzukimusiclosangeles.com/membership/teacher-registration/
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22
array (
'state' => 'response',
'transport_class' => 'WP_HTTP_curl',
'args' =>
array (
'method' => 'POST',
'timeout' => 20,
'redirection' => 5,
'httpversion' => '1.1',
'user-agent' => 'WordPress/3.5.1; http://www.suzukimusiclosangeles.com',
'blocking' => true,
'headers' =>
array (
'Accept-Encoding' => 'deflate;q=1.0, compress;q=0.5',
'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8',
'Content-Length' => 1196,
),
'cookies' =>
array (
),
'body' => 'METHOD=SetExpressCheckout&RETURNURL=http%3A%2F%2Fwww.suzukimusiclosangeles.com%2Fmembership%2Fteacher-registration%2F%3Fs2member_paypal_xco%3Ds2member_pro_paypal_checkout_return&CANCELURL=http%3A%2F%2Fwww.suzukimusiclosangeles.com%2Fmembership%2Fteacher-registration%2F%3Fs2member_paypal_xco%3Ds2member_pro_paypal_checkout_cancel&PAGESTYLE=paypal&LOCALECODE=&NOSHIPPING=1&SOLUTIONTYPE=Sole&LANDINGPAGE=Billing&ALLOWNOTE=0&PAYMENTREQUEST_0_PAYMENTACTION=Sale&PAYMENTREQUEST_0_DESC=%2450.00+USD+%2F+1+year+access&PAYMENTREQUEST_0_CUSTOM=www.suzukimusiclosangeles.com&PAYMENTREQUEST_0_CURRENCYCODE=USD&PAYMENTREQUEST_0_ITEMAMT=50.00&PAYMENTREQUEST_0_TAXAMT=0.00&PAYMENTREQUEST_0_AMT=50.00&L_PAYMENTREQUEST_0_QTY0=1&L_PAYMENTREQUEST_0_NAME0=%2450.00+USD+%2F+1+year+access&L_PAYMENTREQUEST_0_NUMBER0=3%3A%3A1+Y&L_PAYMENTREQUEST_0_AMT0=50.00&PAYMENTREQUEST_0_SHIPTONAME=Hester+Taylor&PAYMENTREQUEST_0_SHIPTOSTREET=&PAYMENTREQUEST_0_SHIPTOCITY=&PAYMENTREQUEST_0_SHIPTOSTATE=&PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=US&PAYMENTREQUEST_0_SHIPTOZIP=&EMAIL=hesterltaylor%40gmail.com&VERSION=71.0&USER=carey_api1.corkybird.com&PWD=MXNG9PQ9L9Y8TFA7&SIGNATURE=ALFcB9rWDjHkybTNFNLKZ30mYycYACibtf1zH-SLehyXrtdgk9Hh1ijD',
'compress' => false,
'decompress' => true,
'sslverify' => false,
'stream' => false,
'filename' => NULL,
's2member' => '130221',
'_redirection' => 5,
'ssl' => true,
'local' => false,
),
'url' => 'https://api-3t.paypal.com/nvp',
'response' =>
WP_Error::__set_state(array(
'errors' =>
array (
'http_request_failed' =>
array (
0 => 'connect() timed out!',
),
),
'error_data' =>
array (
),
)),
)
EDIT:
Talked with the hosting company again. The guy said he’s looking at error logs on the server and found some errors relating to scripting..here is the log of just some of the latest issues;
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current set
20121103T045939: www.suzukimusiclosangeles.com/wp-cron.php
PHP Warning: session_start(): open(/var/php_sessions/sess_f3f8fffed6db4ddf7073becac7affcc2, O_RDWR) failed: No such file or directory (2) in /hermes/bosweb/web116/b1163/sl.suzukimusic/public_html/wp-content/plugins/contact-form-plugin/contact_form.php on line 852
PHP Warning: Unknown: open(/var/php_sessions/sess_f3f8fffed6db4ddf7073becac7affcc2, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current set
20121103T045940: www.suzukimusiclosangeles.com/index.php
PHP Warning: session_start(): open(/var/php_sessions/sess_27bdb6c560ee9e1c0be029e9fb469acd, O_RDWR) failed: No such file or directory (2) in /hermes/bosweb/web116/b1163/sl.suzukimusic/public_html/wp-content/plugins/contact-form-plugin/contact_form.php on line 852
PHP Warning: Unknown: open(/var/php_sessions/sess_27bdb6c560ee9e1c0be029e9fb469acd, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current set
20121103T060320: www.suzukimusiclosangeles.com/wp-cron.php
PHP Warning: session_start(): open(/var/php_sessions/sess_962ad3e2d3f9af9a14e3294cb126d139, O_RDWR) failed: No such file or directory (2) in /hermes/bosweb/web116/b1163/sl.suzukimusic/public_html/wp-content/plugins/contact-form-plugin/contact_form.php on line 852
PHP Warning: Unknown: open(/var/php_sessions/sess_962ad3e2d3f9af9a14e3294cb126d139, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current set
20121103T060321: www.suzukimusiclosangeles.com/index.php
PHP Warning: session_start(): open(/var/php_sessions/sess_19491e043720c3130df89ab0ac9b2e4a, O_RDWR) failed: No such file or directory (2) in /hermes/bosweb/web116/b1163/sl.suzukimusic/public_html/wp-content/plugins/contact-form-plugin/contact_form.php on line 852
PHP Warning: Unknown: open(/var/php_sessions/sess_19491e043720c3130df89ab0ac9b2e4a, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current set
20121103T063754: suzukimusiclosangeles.com/index.php
PHP Warning: session_start(): open(/var/php_sessions/sess_24b44030da0e6a64dd8e33007bc0d8ba, O_RDWR) failed: No such file or directory (2) in /hermes/bosweb/web116/b1163/sl.suzukimusic/public_html/wp-content/plugins/contact-form-plugin/contact_form.php on line 852
PHP Warning: Unknown: open(/var/php_sessions/sess_24b44030da0e6a64dd8e33007bc0d8ba, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current set
20121103T063754: www.suzukimusiclosangeles.com/wp-cron.php
Is there anything else you would like me to check?
|
|
upgraded to the latest on both..
PayPal API log:
LOG ENTRY: Fri Mar 22nd, 2013 @ precisely 5:07 pm UTC
PHP v5.3.13 :: WordPress® v3.5.1 :: s2Member® v130221 :: s2Member® Pro v130221
Memory 16.98 MB :: Real Memory 17.50 MB :: Peak Memory 17.01 MB :: Real Peak Memory 17.50 MB
www.suzukimusiclosangeles.com/membership/family-registration/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:19.0) Gecko/20100101 Firefox/19.0
-------- Input vars: ( Fri Mar 22, 2013 5:06:42 pm UTC ) --------
array (
'METHOD' => 'SetExpressCheckout',
'RETURNURL' => 'http://www.suzukimusiclosangeles.com/membership/family-registration/?s2member_paypal_xco=s2member_pro_paypal_checkout_return',
'CANCELURL' => 'http://www.suzukimusiclosangeles.com/membership/family-registration/?s2member_paypal_xco=s2member_pro_paypal_checkout_cancel',
'PAGESTYLE' => 'paypal',
'LOCALECODE' => '',
'NOSHIPPING' => '1',
'SOLUTIONTYPE' => 'Sole',
'LANDINGPAGE' => 'Billing',
'ALLOWNOTE' => '0',
'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale',
'PAYMENTREQUEST_0_DESC' => '$25.00 USD / 1 year access',
'PAYMENTREQUEST_0_CUSTOM' => 'www.suzukimusiclosangeles.com',
'PAYMENTREQUEST_0_CURRENCYCODE' => 'USD',
'PAYMENTREQUEST_0_ITEMAMT' => '25.00',
'PAYMENTREQUEST_0_TAXAMT' => '0.00',
'PAYMENTREQUEST_0_AMT' => '25.00',
'L_PAYMENTREQUEST_0_QTY0' => '1',
'L_PAYMENTREQUEST_0_NAME0' => '$25.00 USD / 1 year access',
'L_PAYMENTREQUEST_0_NUMBER0' => '4::1 Y',
'L_PAYMENTREQUEST_0_AMT0' => '25.00',
'PAYMENTREQUEST_0_SHIPTONAME' => 'Danny Kim',
'PAYMENTREQUEST_0_SHIPTOSTREET' => '',
'PAYMENTREQUEST_0_SHIPTOCITY' => '',
'PAYMENTREQUEST_0_SHIPTOSTATE' => '',
'PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE' => 'US',
'PAYMENTREQUEST_0_SHIPTOZIP' => '',
'EMAIL' => 'dkim1985@yahoo.com',
'VERSION' => '71.0',
'USER' => 'carey_api1.corkybird.com',
'PWD' => 'MXNG9PQ9L9Y8TFA7',
'SIGNATURE' => 'ALFcB9rWDjHkybTNFNLKZ30mYycYACibtf1zH-SLehyXrtdgk9Hh1ijD',
)
-------- Output string/vars: ( Fri Mar 22, 2013 5:07:02 pm UTC ) --------
array (
'__error' => 'Error. Please contact Support for assistance.',
)
I still get the same error..
What else can I do?
|
|
Also…using..
WordPress 3.4.2
s2member 121023
Hope this helps..
|
|
PayPal log.
-------- Input vars: ( Fri Mar 22, 2013 3:42:27 am UTC ) --------
array (
'METHOD' => 'SetExpressCheckout',
'RETURNURL' => 'http://www.suzukimusiclosangeles.com/membership/family-registration/?s2member_paypal_xco=s2member_pro_paypal_checkout_return',
'CANCELURL' => 'http://www.suzukimusiclosangeles.com/membership/family-registration/?s2member_paypal_xco=s2member_pro_paypal_checkout_cancel',
'PAGESTYLE' => 'paypal',
'LOCALECODE' => '',
'NOSHIPPING' => '1',
'SOLUTIONTYPE' => 'Sole',
'LANDINGPAGE' => 'Billing',
'ALLOWNOTE' => '0',
'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale',
'PAYMENTREQUEST_0_DESC' => '$25.00 USD / 1 year access',
'PAYMENTREQUEST_0_CUSTOM' => 'www.suzukimusiclosangeles.com',
'PAYMENTREQUEST_0_CURRENCYCODE' => 'USD',
'PAYMENTREQUEST_0_ITEMAMT' => '25.00',
'PAYMENTREQUEST_0_TAXAMT' => '0.00',
'PAYMENTREQUEST_0_AMT' => '25.00',
'L_PAYMENTREQUEST_0_QTY0' => '1',
'L_PAYMENTREQUEST_0_NAME0' => '$25.00 USD / 1 year access',
'L_PAYMENTREQUEST_0_NUMBER0' => '4::1 Y',
'L_PAYMENTREQUEST_0_AMT0' => '25.00',
'PAYMENTREQUEST_0_SHIPTONAME' => 'Devon Bagley',
'PAYMENTREQUEST_0_SHIPTOSTREET' => '',
'PAYMENTREQUEST_0_SHIPTOCITY' => '',
'PAYMENTREQUEST_0_SHIPTOSTATE' => '',
'PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE' => 'US',
'PAYMENTREQUEST_0_SHIPTOZIP' => '',
'EMAIL' => 'dbagley@ipowerweb.com',
'VERSION' => '71.0',
'USER' => 'carey_api1.corkybird.com',
'PWD' => 'MXNG9PQ9L9Y8TFA7',
'SIGNATURE' => 'ALFcB9rWDjHkybTNFNLKZ30mYycYACibtf1zH-SLehyXrtdgk9Hh1ijD',
)
-------- Output string/vars: ( Fri Mar 22, 2013 3:42:48 am UTC ) --------
array (
'__error' => 'Error. Please contact Support for assistance.',
)
|
|
I was on the phone with tech support from my hosting company.
The guy said it looks like the information is being sent to PayPal and PayPal is returning the error.
What can I do to get a more detailed error from PayPal to see whats wrong?
|
|
hello eduan.
that’s all the error says.
the s2member system check didn’t have any problems.
is there anything else that I can post for you?
|
|
I haven’t been able to test it myself.
I will do so shortly and let you know!
|
|
Hi Eduan.
Thanks for your feedback!
The part I’m worried about is toward the end about the wp_mail function. Im not sure if I did that correctly.
Also, this is going on a client’s website so I want to make sure the coding is atleast double checked before I upload it.
|
|
..anybody? could really use some help with this.
|