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™

Custom Capabilities

s2Member Plugin. A Membership plugin for WordPress®.

Custom Capabilities

Postby scalare » November 23rd, 2010, 3:15 pm

Hi,

around July I deployed a site that required me to work with custom capabilities.

I had 2 sets of pages that I had to protect. What I did was this:

1) Have two categories: pack1 and pack2.
2) Assign posts to the corresponding categories depending to which pack they belong.
3) Protect the two categories in Category Access Restrictions, for level 1, separated with a comma.
4) Create two buttons for level1, with pack1 and pack2 as custom capabilities for each one.
5) And then add advanced conditionals to single.php template to check the category of each post, and verify if (current_user_can("access_s2member_ccap_pack1")) or (current_user_can("access_s2member_ccap_pack2")) to decide if I can display the post, or have to redirect to the Membership Options page.

But there would be some users that would buy both packs at some point, so in that case, current_user_can should be true for both conditions.

So I had to create a Modification Button with s2Member's Button Generator. Supply both Capabilities in comma delimited format, and establish the cost for the upgrade. Users will already have one Capability, so the new Button should include both Capabilities, and be sold at a lower rate.

I was told that "The important thing to realize, is that s2Member is NOT yet capable of just adding a single Capability. You have to give s2Member the big picture, and include a full set of features in each Button Code. After checkout, s2Member will update the account to the new feature set; based on the Level and Capabilities you configured in the Modification Button.

This Modification Button should be introduced to a Customer that is already logged into your site ( possibly on the Login Welcome Page ), with a link that says " upgrade your account! "."

Sorry about the long explanation. Now I have a new site that I was planning to create using s2member. The problem I have now is that the pages I have to protect have videos in them, the client wants visitors to view the videos in the site (not download them so the buy now buttons do not seem to be the solution), and they may buy access to several videos at different points. I'm not sure if the latest version of the plugin would let me do this without having to create modification buttons having into account all the previous history of purchases of a given user.

Could someone explain how I can do this with the latest version of the plugin?

I hope the explanation makes sense.

Thank you in advance
Andres
User avatar
scalare
Registered User
Registered User
 
Posts: 10
Joined: July 23, 2010

Re: Custom Capabilities

Postby scalare » November 24th, 2010, 12:04 pm

I should have said that the videos will be more than 50, so it is practically impossible to cover all the combinations through modification buttons that way.

Thanks.
User avatar
scalare
Registered User
Registered User
 
Posts: 10
Joined: July 23, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 3 guests

cron