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.

Bonus – only after trial is over?

Home Forums Community Forum Bonus – only after trial is over?

This topic contains 7 replies, has 3 voices. Last updated by  Adam Tal 4 years, 10 months ago.

Topic Author Topic
Posted: Sunday Feb 19th, 2012 at 11:14 am #5646
Adam Tal
Username: baduist

I’ve set up my website to offer a $1 trial for a couple of days. I want to offer a bonus to those who stick to their membership after the trial is over – what would be the easiest/best way to do that?

I couldn’t find any conditionals for this. And can’t really figure out how to configure a different membership level for trials.

List Of Topic Replies

Viewing 7 replies - 1 through 7 (of 7 total)
Author Replies
Author Replies
Posted: Monday Feb 20th, 2012 at 7:26 pm #5763
Staff Member

Hi there. Thanks for your inquiry.
I might classify that request as “Content Dripping”.

You’ll find further details on this in your Dashboard under:
s2Member -> API Scripting -> Content Dripping

Posted: Tuesday Feb 21st, 2012 at 9:37 am #5863
Adam Tal
Username: baduist

Awe – some!!!

Is there anything you did not think of?:)
Sorry for all the noob questions btw, I guess I just need to learn the terminology etc.

Posted: Tuesday Feb 21st, 2012 at 9:45 am #5866
Adam Tal
Username: baduist

Is there an easy way to test the dripping conditions? Or do I have to just create a couple of users and wait for them to be members for X days?:)

Posted: Wednesday Feb 22nd, 2012 at 2:18 pm #5985
Raam Dev
Username: Raam
Staff Member

Hi Adam,

You’d have to create a couple of users and wait. :) However, for testing purposes, you could set up your code to use S2MEMBER_CURRENT_USER_REGISTRATION_TIME instead of S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS and then configure specific times that might emulate the content dripping setup you have in place, except maybe using hours instead of days.

Please see WP Admin -> s2Member -> API/Scripting -> s2Member PHP/API Constants for a description of S2MEMBER_CURRENT_USER_REGISTRATION_TIME.

Posted: Wednesday Feb 22nd, 2012 at 2:19 pm #5986
Adam Tal
Username: baduist

Thanks, that’s pretty cool.

Could you give me a quick example of how to use the time tag? Can I use full hours or should I use milliseconds etc?

Adam

Posted: Thursday Feb 23rd, 2012 at 1:57 pm #6139
Raam Dev
Username: Raam
Staff Member

Hi Adam,

You can find details about how that constant works by going to Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants. The constant returns the registration time in the form of a Unix timestamp.

So for example, let’s say you want to start testing your content dripping today. You can get the Unix timestamp for 12pm today (1329998400) and then add 3600 seconds to it (1 hour): 1330002000. (Keep in mind Unix timestamps are always UTC, so adjust accordingly for your timezone.)

That means at 1pm it will be 1330002000 in Unix time. I’ll continue adding 3600 seconds to create three timestamps:

1330002000 (1 hour from now)
1330005600 (2 hours from now)
1330009200 (3 hours from now)

With those, I can now modify the content dripping code as follows:

<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_TIME >= 1330002000){ ?>
    Drip content to Members that registered at least 1 hour ago.
<?php } ?>

<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_TIME >= 1330005600){ ?>
        Drip content to Members that registered at least 2 hours ago.
<?php } ?>

<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_TIME >= 1330009200){ ?>
    Drip content to Members that registered at least 3 hours ago.
<?php } ?>
  • This reply was modified 4 years, 10 months ago by  Raam Dev.
Posted: Thursday Feb 23rd, 2012 at 2:01 pm #6141
Adam Tal
Username: baduist

Thanks man!

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

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.