PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Content dripping for multiple custom capabilities

s2Member Plugin. A Membership plugin for WordPress®.

Content dripping for multiple custom capabilities

Postby pixls » September 28th, 2011, 5:27 am

Hi!

I'm building this site where i'm going to sell different courses. I'm setting it up using custom capabilities(course1, course2 etc...). I also want it to drop new content automatically every week and it's here i'm getting stuck.

I think i know the answer to my question after searching the forum but I still want to make sure so I know how I should approach this project.

Ok here is the scenario. If a member purchases course1(ccap) today and then course2 in three months, s2member would still drip the content in course2 like he would have bought it the same day as he did course1(three months ago) because s2member don't register when the member bought the custom capability package if I understand how it works correctly? Also the member can't just end the term for course1 and continue with course2, he would just end his membership altogether?

I would really appreciate it if someone who had this problem could help me out because I feel a little stuck right now in how i should approach this project. :)
User avatar
pixls
Registered User
Registered User
 
Posts: 6
Joined: September 27, 2011

Re: Content dripping for multiple custom capabilities

Postby cassel » September 28th, 2011, 6:45 am

I am sure at 99% that it wont work with multiple courses like that because the system seems able to handle only one date at the time (EOT) so i could just assume it would be the same for "start date". However, maybe you could use a mailing list, like MailChimp, that allowes automatic sending, and you could have each new section sent as a link that is not accessible directly from the site (so nobody could SEE it) and have it accessible with conditionals, in case someone wants to share the link with their neighbour. This is just an idea from a user, but maybe Jason or Cristian would have another more advanced alternative for you.
Good luck.
User avatar
cassel
Experienced User
Experienced User
 
Posts: 442
Joined: February 17, 2011

Re: Content dripping for multiple custom capabilities

Postby pixls » September 28th, 2011, 6:59 am

Thank's for your help and the MailChimp tip but i'm hoping for a "prettier" solution. :)

If one of the plugin devs see this, do you have anything planned in the future that would bring this functionality? :)
User avatar
pixls
Registered User
Registered User
 
Posts: 6
Joined: September 27, 2011

Re: Content dripping for multiple custom capabilities

Postby crazycoolcam » September 28th, 2011, 7:10 am

I'm watching this post because I just posted something similar--although a little more complex over here: http://www.primothemes.com/forums/viewtopic.php?f=4&t=15339#p41828

I think what you are wanting to do is possible, however you will need to base your logic off of the purchase times and not the EOT. (I think I remember reading about this somewhere over the last week or so, but I don't remember where.) It would use logic like x number of days after the CCap purchase date.

~Crazycoolcam
User avatar
crazycoolcam
Registered User
Registered User
 
Posts: 9
Joined: September 27, 2011

Re: Content dripping for multiple custom capabilities

Postby pixls » September 28th, 2011, 7:22 am

hmm ok. Do you have any idea how I would go about doing that? Ain't that good with php, just have a basic understanding of it really. :)
User avatar
pixls
Registered User
Registered User
 
Posts: 6
Joined: September 27, 2011

Re: Content dripping for multiple custom capabilities

Postby crazycoolcam » September 28th, 2011, 7:56 am

This is taken from the S2Member Content Dripping section in the admin panel. I don't remember if a Ccap can take the place of the level, but it is possible that it could.

Hope this helps.

~Crazycoolcam
----------------------------------------------

* Function: s2member_paid_registration_time ($level, $user_id); // returns a Unix timestamp.

The $level argument is optional. It defaults to the first/initial Paid Registration Time, regardless of Level#.
Or you could do this: s2member_paid_registration_time("level1"); which will give you the Registration Time at Level #1.
If a User/Member has never paid for Level #1 ( i.e. they signed up at Level#2 ), the function will return 0.

The argument $user_id defaults to the current user that is logged in.

Here are some examples:

Code: Select all
<?php
$time = s2member_registration_time (); // ... first registration time ( free or otherwise ).
$time = s2member_paid_registration_time (); // ... first "paid" registration and/or upgrade time.
$time = s2member_paid_registration_time ("level1"); // ... first "paid" registration or upgrade time at Level#1.
$time = s2member_paid_registration_time ("level2"); // ... first "paid" registration or upgrade time at Level#2.
$time = s2member_paid_registration_time ("level3"); // ... first "paid" registration or upgrade time at Level#3.
$time = s2member_paid_registration_time ("level4"); // ... first "paid" registration or upgrade time at Level#4.
?>

Here are some actual examples that should give you some ideas:

------- Example #1 ------------------------------------------------------

<?php if(s2member_paid_registration_time() > 0){ ?>

    This is some content that will be displayed to all Members that have paid you at some point.

    <?php if(s2member_paid_registration_time("level2") > 0){ ?>
        This will be displayed to all Members that have paid for Level#2 at some point.
    <?php } ?>

    <?php if(s2member_paid_registration_time("level3") > 0){ ?>
        This will be displayed to all Members that have paid for Level#3 at some point.
    <?php } ?>

<?php } ?>

------- Example #2 ------------------------------------------------------

<?php if(s2member_paid_registration_time() > 0){ ?>

    This is some content that will be displayed to all Members that have paid you at some point.

    <?php if(s2member_paid_registration_time("level1") >= ($_30_days_ago = strtotime("-30 days"))){ ?>
        Drip content to Members that started paying you at Level#1, at least 30 days ago.
    <?php } ?>

    <?php if(s2member_paid_registration_time("level1") >= ($_60_days_ago = strtotime("-60 days"))){ ?>
        Drip more content to Members that started paying you at Level#1, at least 60 days ago.
    <?php } ?>

<?php } ?>
User avatar
crazycoolcam
Registered User
Registered User
 
Posts: 9
Joined: September 27, 2011

Re: Content dripping for multiple custom capabilities

Postby pixls » September 28th, 2011, 8:21 am

crazycoolcam wrote:This is taken from the S2Member Content Dripping section in the admin panel. I don't remember if a Ccap can take the place of the level, but it is possible that it could.

Hope this helps.

~Crazycoolcam
----------------------------------------------

* Function: s2member_paid_registration_time ($level, $user_id); // returns a Unix timestamp.

The $level argument is optional. It defaults to the first/initial Paid Registration Time, regardless of Level#.
Or you could do this: s2member_paid_registration_time("level1"); which will give you the Registration Time at Level #1.
If a User/Member has never paid for Level #1 ( i.e. they signed up at Level#2 ), the function will return 0.

The argument $user_id defaults to the current user that is logged in.

Here are some examples:

Code: Select all
<?php
$time = s2member_registration_time (); // ... first registration time ( free or otherwise ).
$time = s2member_paid_registration_time (); // ... first "paid" registration and/or upgrade time.
$time = s2member_paid_registration_time ("level1"); // ... first "paid" registration or upgrade time at Level#1.
$time = s2member_paid_registration_time ("level2"); // ... first "paid" registration or upgrade time at Level#2.
$time = s2member_paid_registration_time ("level3"); // ... first "paid" registration or upgrade time at Level#3.
$time = s2member_paid_registration_time ("level4"); // ... first "paid" registration or upgrade time at Level#4.
?>

Here are some actual examples that should give you some ideas:

------- Example #1 ------------------------------------------------------

<?php if(s2member_paid_registration_time() > 0){ ?>

    This is some content that will be displayed to all Members that have paid you at some point.

    <?php if(s2member_paid_registration_time("level2") > 0){ ?>
        This will be displayed to all Members that have paid for Level#2 at some point.
    <?php } ?>

    <?php if(s2member_paid_registration_time("level3") > 0){ ?>
        This will be displayed to all Members that have paid for Level#3 at some point.
    <?php } ?>

<?php } ?>

------- Example #2 ------------------------------------------------------

<?php if(s2member_paid_registration_time() > 0){ ?>

    This is some content that will be displayed to all Members that have paid you at some point.

    <?php if(s2member_paid_registration_time("level1") >= ($_30_days_ago = strtotime("-30 days"))){ ?>
        Drip content to Members that started paying you at Level#1, at least 30 days ago.
    <?php } ?>

    <?php if(s2member_paid_registration_time("level1") >= ($_60_days_ago = strtotime("-60 days"))){ ?>
        Drip more content to Members that started paying you at Level#1, at least 60 days ago.
    <?php } ?>

<?php } ?>




I have already been fiddling around with all the code in the "Content Dripping" section without any success. I don't think it would do anything to just put in a ccap instead of a level (...(s2member_paid_registration_time("level1")...) as s2Member don't register the time of purchase from ccap. That's what it seems like to me anyway but that's also my question to anyone who knows if there is a way to get to know how long the member have had access to a specific ccap?

oh and yeah my last question for you was meant for this segment "I think what you are wanting to do is possible, however you will need to base your logic off of the purchase times and not the EOT." How would you do that with "purchase times"? :)
User avatar
pixls
Registered User
Registered User
 
Posts: 6
Joined: September 27, 2011

Re: Content dripping for multiple custom capabilities

Postby crazycoolcam » September 28th, 2011, 8:59 am

I am only speculating. I have not actually done this, but from my research, it would appear that this would be the most logical way to do it.

Hopefully we'll get a better more definitive response from someone more experienced. :)

~Cam
User avatar
crazycoolcam
Registered User
Registered User
 
Posts: 9
Joined: September 27, 2011

Re: Content dripping for multiple custom capabilities

Postby pixls » September 28th, 2011, 9:06 am

Jason and Cristian, you care to help us out here? Pretty please. :D
User avatar
pixls
Registered User
Registered User
 
Posts: 6
Joined: September 27, 2011

Re: Content dripping for multiple custom capabilities

Postby Cristián Lávaque » October 1st, 2011, 3:20 am

pixls wrote:If one of the plugin devs see this, do you have anything planned in the future that would bring this functionality? :)


Cassel is right, this is not possible yet, since the times for the ccaps aren't logged yet, and there's a single EOT that affects them all.

Yes, this is something that we plan to have soon. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Content dripping for multiple custom capabilities

Postby cassel » October 1st, 2011, 3:14 pm

I am anxiously waiting for that feature!!!!
User avatar
cassel
Experienced User
Experienced User
 
Posts: 442
Joined: February 17, 2011

Re: Content dripping for multiple custom capabilities

Postby crazycoolcam » October 1st, 2011, 5:13 pm

Me too!
User avatar
crazycoolcam
Registered User
Registered User
 
Posts: 9
Joined: September 27, 2011

Re: Content dripping for multiple custom capabilities

Postby kennymcnett » October 11th, 2011, 8:59 pm

Cristian, this thread brings up all sorts of questions. If you recall, I'm building a site almost entirely based on ccap subscriptions for individual posts and for categories of posts.

Since there's only one EOT in the WP admin, are individual ccap subscription lengths modifiable via the paypal interface?

How should I handle a registered user who has purchased one ccap'd subscription, but 3 months later wants to purchase a differen't ccap'd subscription?

Joe buys an individual post (ccap1). It lasts for 1 year.
3 months later, Joe buys a different post (ccap2). It also lasts for a year.

Is that going to prompt him to register a separate account on my site?
Does that automatically bump the EOT for ccap1 to ccap2's EOT?
Can I edit/manage/cancel those subscriptions separately inside of paypal?

Thank you,

Kenny
User avatar
kennymcnett
Registered User
Registered User
 
Posts: 23
Joined: October 5, 2011
Location: Los Angeles


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest

cron