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.

Need help with post restrictions.

Home Forums Community Forum Need help with post restrictions.

This topic contains 3 replies, has 2 voices. Last updated by  David Welch 4 years ago.

Topic Author Topic
Posted: Thursday Dec 27th, 2012 at 6:13 pm #35588

I have setup 4 different levels:
(0) Free
(1) Paid Level #1
(2) Paid Level #2
(3) Paid Level #3

I have created 4 different “Posts”. Each post will contain information for each level. No level can see the other posts. If you have subscribed to “Paid Level #3”, you should only be able to see what is on the “Post” for level 3. If you are subscribed to “Paid Level #1), you should only be able to see what is on the “Post” for level 1.

My issue is:

For example, my issue is in s2Member > Restriction Options > Post Access Restrictions. “On Posts That Require Level #0 or Higher”, when I enter the “page id” for the post that should only be accessed by the (0) Free subscription it will allow (1), (2), and (3) access to it. I do not want to allow access to that page to anyone other than (0) Free.

Second example, “On Posts That Require Level #1 or Higher”, when I enter the “page id” for the post that should only be accessed by the (1) Paid Level #1 subscription it will allow (2), and (3) access to it. I do not want to allow access to that page to anyone other than (1) Paid Level #1.

Is there a way to accomplish this?

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Dec 27th, 2012 at 11:43 pm #35593
David Welch
Username: dwbiz05

Yes there is…

This is a very common issue for people starting out with s2member.

S2Member’s “access restrictions” build on each other. They assume that if you buy a higher level, then you should have access to everything else “below” it.

You can change this functionality very simply though by adding “custom capabilities” to your posts and sign-up buttons/forms.

For example…

If you want Level 1 access to only be accessed by Level 1 users, you can add a custom capability like “only_one” to those pages as well as the level one access restriction for that post/page.

Also, you will need to add this custom capability (ccap) to your payment button or registration form to ensure your level one users have level one access AND the ccap.

One other cool feature of using ccaps is that you really don’t have to have levels 2-4… just make payment buttons for level 1 with different ccaps and add those different ccaps to the correct pages that those “levels” would have access to.

In this way, the basic form of s2member can virtually be limitless on its “access levels”.

I hope that makes sense.

There is also a video about doing this here:

http://www.s2member.com/videos/A2C07377CF60025E/

Dave Welch

Posted: Friday Dec 28th, 2012 at 6:59 am #35603

Dave,

Thank you for your very helpful and quick response. I have watched the video, but still have another question. One thing I did forget to ask about in the original post is what if the user wants to purchase two packages. Say they want to purchase both (1) Paid Level #1 and (3) Paid Level #3. One the four posts I have made, the tag and category for level #1 is tag: true_value and category slug: true-value. On the post for level #3 tag: real_strategy and the category slug: real-strategy. Would I have to write the php to look for any combination of tags/category slugs so someone who has purchased both would have access to only those two pages?

Also, in creating the PP buttons, the user has already purchased “Paid Level #1” so the button would have the ccap in it of “true_value”. So, I assume in the user profile that “Custom Capabilities” would initially have the value “true_value”. When the user purchases the additional “Paid Level#3”, will the user’s “Custom capabilities” now show “true_value,real_strategy” or will it delete the “true_value” and replace it with “real_strategy”?

Thanks for your help in this. You have been a big help.

Posted: Friday Dec 28th, 2012 at 11:58 am #35625
David Welch
Username: dwbiz05

To me, the easiest way would be to forget all your “levels” and just use the custom capabilities as your “levels” for access.

You can then create buttons to purchase specific custom capabilities if someone wants to “upgrade.”

Also, I created a VERY BASIC shopping cart that allows users to select “custom capabilities” or “packages” and it adds it all to one registration or payment form.

Here is a link to the post:

http://www.s2member.com/forums/topic/user-selected-cc-ad-ons-extension-beta/

Hope that helps.

Dave

Viewing 3 replies - 1 through 3 (of 3 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.