latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Ayurveda

Sorry, I've not written a description yet. I'll get to it soon!


Topics I've Started

Viewing 8 topics - 1 through 8 (of 8 total)
Topic Count Last Reply
EOT to minute?

By:  Ayurveda in: Community Forum

voices: 2
replies: 1

4 years ago  Bruce

Membership Renewal and setup

By:  Ayurveda in: Community Forum

voices: 3
replies: 10

4 years ago  Ayurveda

EOT fixed date tweak request

By:  Ayurveda in: Community Forum

voices: 3
replies: 7

4 years ago  Cristián Lávaque

Force revision of member details on renewal

By:  Ayurveda in: Community Forum

voices: 3
replies: 3

4 years ago  Bruce

Make email an admin only edit field

By:  Ayurveda in: Community Forum

voices: 2
replies: 1

4 years ago  Eduan

Password protection for Membership Options

By:  Ayurveda in: Community Forum

voices: 3
replies: 10

4 years, 1 month ago  Bruce

Non-member redirect url

By:  Ayurveda in: Community Forum

voices: 1
replies: 1

4 years, 1 month ago  Ayurveda

multiple pricing for 1 level

By:  Ayurveda in: Community Forum

voices: 3
replies: 3

4 years, 1 month ago  Cristián Lávaque

Viewing 8 topics - 1 through 8 (of 8 total)

My Latest Replies (From Various Topics)

Viewing 20 replies - 1 through 20 (of 20 total)
Author Replies
Author Replies
Posted: Sunday Dec 30th, 2012 at 4:33 pm #35823
Ayurveda
Username: panchakarma

Thanks Guys,
As I said, first class.

Happy New Year.

Posted: Sunday Dec 23rd, 2012 at 9:02 am #35427
Ayurveda
Username: panchakarma

Thanks again Guys,
I have to say, you give some of the best and most comprehensive support that I’ve come across. A very few are as good but none are better. Absolutely first class.

As far as our site is concerned almost everything is working as it should now, but is it possible to enter a custom url for the confirmation email login link? We need to redirect to our custom login if possible.

Posted: Saturday Dec 22nd, 2012 at 5:19 pm #35367
Ayurveda
Username: panchakarma

Great, that’s the best idea, I’ll put the renewals options there. Can I use the success attribute in the buy now buttons shortcode Cristian?

Posted: Friday Dec 21st, 2012 at 10:11 am #35249
Ayurveda
Username: panchakarma

Hi Cristian,
The way we have the system set up is so that all memberships run to a specific date which is defined by the php code:

<?php
    add_action ("ws_plugin__s2member_during_configure_user_registration_front_side", "my_fixed_EOT_time");
    add_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars", "my_fixed_EOT_time");
    add_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_modify", "my_fixed_EOT_time");
    function my_fixed_EOT_time ($vars)
        {
            $expire_on = strtotime(date('Y') . '-12-31');
            update_user_option ($vars["user_id"], "s2member_auto_eot_time", $expire_on);
        }
?>

We are then selling ‘by now’ one year non-recurring payments which all terminate on the same date. Our EOT behaviour is set to demote. Our membership options page contains all of the buy now buttons and our membership renewals page contains three PayPal billing modifications forms which relate to our three different price points for level 1 membership (dependent on financial status). What I need to achieve is for demoted members to receive a notification and a redirection to our membership renewals page on login where they will simply select the price point PayPal billing modifications form which applies to them. As our organisation is a trust based, not for profit association, our members can be trusted to make the right selection, we just need this remind and redirect process in place for them.

<?php
if (!current_user_can('access_s2member_level1')) {
	wp_redirect('http://apa.uk.com/membership-renewals'); 
	exit();
}
?>

Unfortunately, this code is not working. When i set my eot to a date that has already passed, it just allows me access as if my eot had not expired.

As I only have basic knowledge of PHP, I don’t know why I’m afraid.

Once again many thanks Christian, your diligence this close to our deadline it’s very much appreciated.

  • This reply was modified 4 years ago by  Ayurveda.
Posted: Thursday Dec 20th, 2012 at 1:59 pm #35183
Ayurveda
Username: panchakarma

A fantastically comprehensive response which has kept me busy for a while! Thanks Cristian. I have managed to follow your guide most of the way but I am failing to get this script, which I found in another post, to operate at the top of my members welcome page:

<?php
if(current_user_can('access_s2member_level1')) /* User is a paid member */ update_user_meta( get_current_user_id(), 's2_is_paid_member', true); ?>
<?php
if(!current_user_can('access_s2member_level1') && get_user_meta(get_current_user_id(), 's2_is_paid_member', true)) /* User is not a paid member */ wp_redirect('http://apa.uk.com/membership-renewals'); exit(); ?>

It will send demoted members to my renewals page. Could you look at the code for me please? I would really appreciate it. Many thanks.

Posted: Tuesday Dec 18th, 2012 at 11:57 am #34948
Ayurveda
Username: panchakarma

So would I be correct in assuming the line should read:

$expire_on = strtotime ("date('Y') . '-12-31'")

Thanks Cristian.

Posted: Tuesday Dec 18th, 2012 at 4:56 am #34891
Ayurveda
Username: panchakarma

Thanks for your response Cristian.
Actually, If I add some supporting text to the profile page, that would achieve a satisfactory result.
How would the shortcode read in order to pull up the profile form of the renewing user, assuming that the landing url is: http://mywebsite/update-my-membership-details
Thanks buddy,
Jon.

Posted: Monday Dec 17th, 2012 at 11:16 am #34846
Ayurveda
Username: panchakarma

Yes, that rectified the back end problem but I am still faced with the original thread topic:

Hi Guys,
I’ve installed the code from this thread:

http://www.primothemes.com/forums/viewtopic.php?f=4&t=10100&p=58978#p21726

Can the code could be adjusted so that it always introduces the EOT year as the subsequent year to the year of payment, i.e. if the registration or renewal is carried out in 2012 then the eot is auto generated as 2012+1=2013 ?
This would mean that the .php would not have to be adjusted year on year.

For clarity, the code is:

<?php
add_action ("ws_plugin__s2member_during_configure_user_registration_front_side", "my_fixed_EOT_time");
add_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars", "my_fixed_EOT_time");
add_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_modify", "my_fixed_EOT_time");
function my_fixed_EOT_time ($vars)
    {
        $expire_on = strtotime ("2014-01-01");
        update_user_option ($vars["user_id"], "s2member_auto_eot_time", $expire_on);
    }
?>

And I’m wondering if in the line:

$expire_on = strtotime ("2014-01-01");

, the year value could be auto generated in this way. The reason it is currently set to 2014 is because the site will be going live at 0000hrs on 2013-01-01. All memberships on this site are due for renewal on the first of Jan each year.

It would be GREAT if you guys could help me with this.
Many thanks.

Posted: Monday Dec 17th, 2012 at 7:21 am #34830
Ayurveda
Username: panchakarma

OK, for anyone finding this thread who may encounter the same problem, when I cut and pasted the php code, my code editor auto added spaces before and after the opening and closing php tags. With the spaces removed, the S2 back end re-appears as before.

Posted: Monday Dec 17th, 2012 at 6:47 am #34827
Ayurveda
Username: panchakarma

Also guys,
I assumed the code would just drop in and work but it breaks the back end of the s2member interface as soon as I add it in?
Any ideas?

Posted: Saturday Dec 8th, 2012 at 6:33 am #33980
Ayurveda
Username: panchakarma

Yep, works like a dream.

  • This reply was modified 4 years, 1 month ago by  Ayurveda.
Posted: Saturday Dec 8th, 2012 at 5:35 am #33975
Ayurveda
Username: panchakarma

*UPDATE*

The fault was my end guys. It was plugin related. For anyone facing this requirement and issue, try:

php-execution

plugin from the wordpress.org repository. Although it came with a warning that it hadn’t been updated for 2 years and may not work with the current version of wordpress, it is the only one that has worked correctly. I guess it was just well coded in the first place!

I used the original code supplied to me by Bruce and the token/key url is now functioning perfectly.

Thanks.

Posted: Saturday Dec 8th, 2012 at 5:15 am #33973
Ayurveda
Username: panchakarma

Scratch that. I’ll put that content in the ‘membership options’ page and have a separate page for our subscription rates and buttons.

Posted: Friday Dec 7th, 2012 at 6:10 pm #33938
Ayurveda
Username: panchakarma

Hi Cristian,
With this I can see the text:

“They have access to the page. Put content here”

But I see it without using the password.

Posted: Friday Dec 7th, 2012 at 3:08 am #33844
Ayurveda
Username: panchakarma

Yep, like to add my voice to this one also.

Posted: Thursday Dec 6th, 2012 at 6:55 pm #33813
Ayurveda
Username: panchakarma

For clarity, I am inserting my site prefix and page name into the url.

Posted: Thursday Dec 6th, 2012 at 6:53 pm #33812
Ayurveda
Username: panchakarma

Hi Bruce,
I’ve tried this with a few of the php plugins but I can’t get the code to function with the link. The page remains blank and the text ‘You do not have access to this page.’ does not appear and when I use the link :

http://yoursite.com/my-membership-options-page/?s2hack_access_page=xxxyyyzzz

it refreshes as :

http://yoursite.com/my-membership-options-page?s2hack_access_page=xxxyyyzzz

but the page remains blank. Any ideas what may be going wrong?

Thank you.

Posted: Thursday Dec 6th, 2012 at 5:16 pm #33790
Ayurveda
Username: panchakarma

Great, thanks Bruce.

Posted: Thursday Dec 6th, 2012 at 5:12 pm #33788
Ayurveda
Username: panchakarma

Once again, thanks Bruce.

Posted: Thursday Dec 6th, 2012 at 8:33 am #33701
Ayurveda
Username: panchakarma

For clarity, if I password protect the page will this mess with the S2 requirement that the options page must always be public. Might it cause a conflict?

Viewing 20 replies - 1 through 20 (of 20 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.