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.

cassel


My Latest Replies (From Various Topics)

Viewing 25 replies - 376 through 400 (of 644 total)
Author Replies
Author Replies
Posted: Wednesday Oct 10th, 2012 at 10:00 pm #28064
cassel
Username: cassel

I made up this code to try to translate into PHP:

<?php if (current_user_can(“access_s2member_level1") && current_user_can("access_s2member_ccap_element") 
    || ((current_user_can(“access_s2member_level2") && current_user_can("access_s2member_ccap_element") && s2member_paid_registration_time("level2")>=7){ ?>
 Display what is supposed to be dripped to the level 2 members, but available to the level 1 members already
<?php } ?> 

How would the function be written with it (if it is even correct to start with).
Then, how is it called back when i need it?

Posted: Wednesday Oct 10th, 2012 at 9:58 pm #28061
cassel
Username: cassel

Getting there (i think). My developper is currently not available so i ‘ll try to figure this one out myself. How is this for a code:

<?php if (current_user_can(“access_s2member_level1") && current_user_can("access_s2member_ccap_element") 
    || ((current_user_can(“access_s2member_level2") && current_user_can("access_s2member_ccap_element") && s2member_paid_registration_time("level2")>=7){ ?>
 Display what is supposed to be dripped to the level 2 members, but available to the level 1 members already
<?php } ?> 

I have to get away from the PAID time in case i need to GIVE one membership for free. But since that is the ONLY membership i have at Level 2, i think it would work. What do you think? However in this example, i dont see the unit for the 7; it is days? weeks? hours? I used the examples in the s2Member PHP/API Constants. Can you correct it?

Posted: Wednesday Oct 10th, 2012 at 7:47 am #27979
cassel
Username: cassel

I am not fluent in PHP language so i need a little “translation” here.
In the other thread: http://www.s2member.com/forums/topic/content-dripping-timesstamp-ccaps/ there was a long and complex php code for content dripping and so on. Do you mean it could be replaced by a function like in your previous post?

In simple English, i would like to have a “conditional” that will determine if the condition is true or false so whatever i want to display, does display at that particular time. Here is what i need translated in php:

if (member is Level1 AND has “element” ccap) OR (member is Level2 AND has “element” ccap” AND has been a level 2 member for x days):
Display the content

Can that be put in that function you mentioned above?

Then, where does the function go?

Then, what will the actual command calling the function look like?

I think that is the only piece i am missing and then, i`ll be good to go.

Posted: Wednesday Oct 10th, 2012 at 6:08 am #27969
cassel
Username: cassel

That would solve my problem!! Thanks.

Posted: Tuesday Oct 9th, 2012 at 10:30 am #27895
cassel
Username: cassel

Cionsidering that the member is currently on Level 1 and i dont need to CHANGE that level, would the “upgrade to Level1” be useable? Or is that “upgrade to level 1” only available to Level 0 members? (which would not make sense since a paid subscription would not be a Level0 would it?)

If i can use the Level 1 to modify a subscription to another Level 1, that would solve the problem. And if it is the case, it might be a good idea to add that tidbit of information since using ccaps is very powerful and probably used a lot, instead of levels.

Posted: Tuesday Oct 9th, 2012 at 6:28 am #27874
cassel
Username: cassel

OK, i’ll try that. Thanks.

Posted: Monday Oct 8th, 2012 at 9:53 am #27792
cassel
Username: cassel

Ok a few details here.
1- I dont need the pro-form. I have a special php code i need to insert to ensure that only FUTURE workshops will be included with the new subscription, not all. So i need a php code for it, and the pro-form does not seem to offer a php version. So i have to stick with the Paypal BUTTON. Which is ok as it also has the Subscriber Modification.

2- problem is: it only offers modification for changing level, not changing ccaps. In my case, i need to ADD ccaps to offer a more expensive membership, not change level. It seems to be the same whether using the button or the pro-form.

Any other alternative to ask the member to manually go and cancel their old subscription on Paypal?

Posted: Monday Oct 8th, 2012 at 8:36 am #27787
cassel
Username: cassel

Thanks. It will help with the testing.

Do i HAVE to have a paid membership to test those?

Also, if the PAID part is the trigger, how can i have a member who would be given a free membership (either manually or by other mean) and still have the content dripped? Or if anything is not automatically set, how can i manually set it (if it is even possible)?

While at it, i currently have this code (not active yet):

<?php if(s2member_paid_registration_time() > 0 && current_user_can("access_s2member_ccap_element")){ ?>
    <?php /* Timestamp at Level #2, or `0` if they've NOT yet paid for Level #2. */
             $level2_payment_time =  s2member_paid_registration_time("level2"); ?>    
    <?php if($level2_payment_time && $level2_payment_time <= ($_7_days_ago = strtotime("-7 days"))){ ?>
        Drip content to Members that started paying you at Level#2, at least 7 days ago.
    <?php } else { ?>
        Sorry, this content is not YET available to you. (not sure this will be there though)
    <?php } ?>
<?php } ?> 

And this will drip content to Level 2 members with the “element” ccaps. Will this ONLY drip content to the Level 2 and leave anyone with Level 1 alone, or do i have to also add that everyone with Level 1 and “element” (no matter the time they registered or paid) can access all that content (since i am adding stuff every week, it is dripping anyways)? How should the code look like?

  • This reply was modified 4 years, 3 months ago by  cassel.
Posted: Monday Oct 8th, 2012 at 8:31 am #27786
cassel
Username: cassel

Oh,. i knew a detail had escaped me. And in my case, the upgrade button is ONLY available to specific members with particular ccaps so they HAVE to be logged in to see the button. That would work. I’ll check that and report back if it does work as intended. Thanks.

Posted: Saturday Oct 6th, 2012 at 1:40 pm #27668
cassel
Username: cassel

OK i am in the process of updating my page to allow for dripping. I am currently using a test page, and using this code i have the preview visible with the link IF the member meets the time requirement, and the preview without the link IF the member does not meet the requirement. Or at least, that is the plan.

The “problem” right now, is how to i test it? I have a few “test members” but they dont PAY, so if it is based on the start of the PAYING process, my test members will never be as a regular member should be. Can it be coded in minutes or hours, even if just for the testing? Can i just replace the “days” mention to “minutes” or “hours”? But again, how do i test it with a test member that is not paying if the pay process is the trigger for that?

Posted: Thursday Oct 4th, 2012 at 2:27 pm #27467
cassel
Username: cassel

Erin, did you get this problem right from the start or was it working fine at one point and then started to redirect when you didn`t want it to?

Posted: Wednesday Oct 3rd, 2012 at 6:24 am #27323
cassel
Username: cassel

How can you extract which particular date? The date for a ccap? For an upgrade? For a recurring membership? What has a recurring membership? The ccap? The Level?

Yeah, i was refering to the date for the recurring membership payment. From what i could read, there was information on initial registration, registration at a specific level and such, but for a specific transaction that is not “new registration” or “registration to Level1”, but just “yet another transaction that happens to be a subscription, possibly after having purchased something else at that same level”, it didn’t seem possible.

Using PHP, you can dynamically configure those attributes before the shortcode generates the form, allowing you to do things like determine what price, recurring rate, initial/trial period, level, ccaps, etc., need to be configured for the user loading the form. For example:

Hum… i’ll have a play with this one because when i inserted some php code initially (or the programmer did), i got an error so he suggested the shortcode could not contain php. We’ll look again.

Thanks. I am sure i’ll be back! :)

Posted: Tuesday Oct 2nd, 2012 at 7:39 am #27208
cassel
Username: cassel

Thanks.

Posted: Monday Oct 1st, 2012 at 7:16 pm #27157
cassel
Username: cassel

This is still a bit confusing for me, and a tiny bit above my comfort zone. Would you mind showing me the actual code for that??

The “problem” i have is that from what i understand (and i probably dont understand correctly) it is the time when the member paid to reach that level (in my case, level1) BUT i have several products that are associated with Level1, and all have ccaps, but only ONE has a recurring membership. So, how can i extract THAT particular date?

Also you are mentioning the pro-form. I could not find where to get a php version of the pro-form. Where is it?

  • This reply was modified 4 years, 3 months ago by  cassel.
  • This reply was modified 4 years, 3 months ago by  cassel.
Posted: Monday Oct 1st, 2012 at 7:13 pm #27154
cassel
Username: cassel

Oh thanks for pointing that detail. I knew it had to be added somewhere.

Posted: Monday Oct 1st, 2012 at 2:33 pm #27111
cassel
Username: cassel

2. Some of the members will belong to more than one group. Eg some of the Executive Committee of the not for profit are also Special Representatives. Let’s say Bill and Anne are Executive Committee Members and Anne and John are Special representatives. Bill should only have access to Executive content and John to Special Representative content but Anne should have access to both.

You can likely achieve that with custom capabilities (ccaps) instead of levels since levels are hierarchical so level 4 sees everything level 3, 2 and 1 see, and level 3 sees all that level 2 and 1 see, and so on. But with custom capabilities (you can use only level 1 if you want), you can have one ccap called “Executive” and one ccap called “representative”, so Bill would be granted access to content protected by the “executive” ccap, John would have access to the content protected by the “representative” ccap and Ann will get access to both. All with Level 1. That can be done with the free version.

As for Buddy Press, i am not familiar with it so i cannot answer, but i am sure someone more knowledgeable will come and chime in. In the mean time, you can watch the video Custom Capabilities just below this page.

Posted: Monday Oct 1st, 2012 at 1:23 pm #27099
cassel
Username: cassel

Hum.. since everyone likely has a different date of payment, that solution wont work, right? Or is there a way to just change the paypal AMOUNT without changing the date?

It also means that if someone paid their regular monthly subscription yesterday, and they click the button for the new subscription today, they will be billed again today even if it is only 24 hours after the last payment?

  • This reply was modified 4 years, 3 months ago by  cassel.
Posted: Monday Oct 1st, 2012 at 1:20 pm #27096
cassel
Username: cassel

ONe current “annoyance” of s2M is that the visitor cannot make two purchases at the same time. They can only purchase ONE, go through the process, and come back for a second one if they want to. Hopefully, it will be a new feature in the next major release.

Posted: Monday Oct 1st, 2012 at 6:33 am #27047
cassel
Username: cassel

I have a similar situation where i have a lifetime course which is a single purchase, called “basic” and a monthly subscription called “element”. They work fine together. The only “problem” is that once a member is registered (free or having purchased the other ccap), and they purchase something with the ccaps, IF they are not logged in, the s2M does not seem to be able to associate the purchase (made while not logged in) to a member who will log in minutes later. That is why it states that the member has to be logged in. But if it is a new member, no problem.

What i found is that (while i can still manage the number of registrations), i have to go check each purchase to make sure the ccaps are added properly, and if not, i add them manually. You can also add, in small characters, something beside or below the purchase button that “if they are already registered, please log in before clicking”.

Of course, another alternative would be to use conditionals and only let the purchase button appear if they are logged in, meaning you would require everyone to register at a Level 0. Depending on your target, it might or might not be convenient.

Posted: Sunday Sep 30th, 2012 at 7:27 pm #27029
cassel
Username: cassel

I am just a bit unsure now, how to code the php. I want the content to be dripped weekly, so i would use multiple of 7 days (unless there is a way to use weeks?). So far, i figured how to set up the basic of the time but where do i include the ccaps? Or do i have to since all those pages will have the same ccap?

<?php if(s2member_paid_registration_time() > 0){ ?>
 
    <?php /* Timestamp at Level #2, or `0` if they've NOT yet paid for Level #2. */
             $level2_payment_time =  s2member_paid_registration_time("level2"); ?>
    
    <?php if($level2_payment_time && $level2_payment_time <= ($_7_days_ago = strtotime("-7 days"))){ ?>
        Drip content to Members that started paying you at Level#2, at least 7 days ago.

    <?php } else { ?>
        Sorry, this content is not YET available to you. (not sure this will be there though)
    <?php } ?>

<?php } ?> 

I am using Level 2 to drip content as it is currently available for members on level 1 where the content was naturally dripped as i was adding it weekly.
This would be put on the page for access for each page accessible after 7 days, and something similar for content accessible after 14 days, 21 days, etc. S

So the questions are: is that setting things up properly? (it is hard to test) and what do i do with the ccaps as i want only the pages currently protected with a specific ccaps to be dripped?

Posted: Friday Sep 28th, 2012 at 1:10 pm #26866
cassel
Username: cassel

For new members, i would not know why it is not working as expected. Maybe Cristian, Eduan or Raam might chime in.

For previously registered members, it is likely because s2M does not KNOW the transaction belongs to an existing member. I guess it does not have a feature (yet), to compare and find the “matching” account. I think they are looking into that for the next release.

  • This reply was modified 4 years, 3 months ago by  cassel.
Posted: Friday Sep 28th, 2012 at 12:42 pm #26863
cassel
Username: cassel

Is the paying member a brand new member? or an existing registered member who is now paying for something?

I found that if an existing registered member makes a purchase without being logged in, s2M does not seem to know what to do with those information. I have had EOT and ccaps not being automatically added in those cases. Would that be your situation?
If the member is brand new: no problem.
If the existing member is logged in when making the purchase; no problem.
If the existing member makes the purchase without being logged in: problem.

Posted: Friday Sep 28th, 2012 at 8:35 am #26837
cassel
Username: cassel

Thanks. Off to study.

Posted: Thursday Sep 27th, 2012 at 9:50 pm #26780
cassel
Username: cassel

It is done just the same as the Buy Now.
You create the button with the recurring settings (how much, what rate, etc.) and in the field after the description, you can enter the custom capability you want.
Then, you protect the content with the specific ccaps, either on the box on top right of the page when you create a new page, or with a conditional statement if it is inside a page (like for partial content).

I have both on my site: one course that is “pay once and access all the time” and one “pay now, and keep paying every month to keep the access”.

Posted: Thursday Sep 27th, 2012 at 9:20 pm #26779
cassel
Username: cassel

I’m not sure I understand what you’re asking, but the main thing to remember is that content dripping is entirely controlled by the conditionals that you create. You can make your conditionals check for any combination of things (Custom Capabilities, Levels, Time Since Registration, Time Since First Payment, etc.).

All my content is currently protecte with a conditional called “Element”, and it is for my Level1 members.
Now, i want NEW members to have the content, but dripped instead of getting all the content at once.
If i make a Level2 membership, can i use the same pages as for Level1-with ccaps “element”, but drip that content based on the registration time of the Level2 subscription.
Maybe i should include a ccaps “element” in the Level2 membership so the members CAN access those protected pages, when the dripping “releases” their respective access?

Viewing 25 replies - 376 through 400 (of 644 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.