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.

Membership and pay-per-post symbiosis

Home Forums Community Forum Membership and pay-per-post symbiosis

This topic contains 3 replies, has 2 voices. Last updated by  Raam Dev 4 years, 2 months ago.

Topic Author Topic
Posted: Tuesday Nov 6th, 2012 at 7:18 am #30762
Sam Lee
Username: innocsrlee

We’ve set up a membership site where we allow access to all posts for all users (members or not). Each post has a couple of custom fields where we add premium content. On the site, we use conditionals to check whether the visitor is logged-in as a member – and if so, we’ll show them premium content instead of regular.

We set it up this way, so that we could show teaser content on each single post page, instead of locking them down and sending users to the registration page when trying to access members’ content.

Now we would like to also offer pay-per-post access to premium content. We’ve run into a couple of different issues with this, the primary being:

  1. If allowing pay-per-post via “Specific Post/Page Access Restrictions”, the post (and its premium content) is not accessible to members
  2. Trying to access a pay-per-post page without purchase redirects to registration page, so that posts no longer show on archive pages and accessing post to read teaser is not possible

I’ve searched high and low on the forum and it seems to be a current restriction, that pay-per-post and membership restrictions don’t play well together. Since we don’t lock post access to membership (just filter content based on membership), I was hoping it would be possible to override some of this behaviour.. but I’m not sure it’s possible to hack this way?

  1. Allow pay-per-case posts to show on archive pages
  2. Allow direct access to pay-per-post pages, even without having purchased access
  3. Use some “if-pay-per-post-purchase = YES” conditional to filter premium content, similar to filtering based on membership level

Duplicating posts – one version for pay-per-post and one for members – isn’t really an option, as we might have hundreds of membership/PPP posts over time.

Would appreciate some input on this and whether it’s possible to achieve what I’m trying to do. I’ve read a couple of similar posts on the forum and someone mentioning hacks, but nothing has been posted about it.

Thanks

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Nov 6th, 2012 at 6:39 pm #30822
Raam Dev
Username: Raam
Staff Member

Hi Sam,

You are correct in that the Specific Post/Page feature of s2Member would not work for your scenario. The Specific Post/Page feature is designed for non-members and purchases of the Specific Post/Page do not get recorded on any account (since that feature is designed to work without accounts).

My next thought was to suggest Custom Capabilities, since you can sell additional Custom Capabilities to existing members on a one-time basis using the Capability Buy Now feature (Dashboard -› s2Member® -› PayPal® Pro Forms -› Capability (Buy Now) Forms). However, if you restrict your content to a Custom Capability and that user doesn’t have the Custom Capability, they won’t be able to see the page, which rules out your requirement to “Allow direct access to pay-per-post pages, even without having purchased access”.

However, Custom Capabilities can still be used: You simply don’t restrict the content to the Custom Capability using the s2Member Restrictions. Instead, you leave the page unrestricted and create a conditional on the post/page that checks if the user has the Custom Capability required for that post/page. If they don’t have the Custom Capability, you show a message that lets them purchase it. If they do have it, you show the premium content. This method will also allow the pages to appear in the Archives.

The conditionals you’d use are Dashboard -› s2Member® -› API / Scripting -› Simple/Shortcode Conditionals.

For example:

[s2If !current_user_can(access_s2member_ccap_premium_content1)]
    Show Capability Buy Now form to purchase the 'premium_content1' Custom Capability and get access to this premium content
[/s2If]

[s2If current_user_can(access_s2member_ccap_premium_content1)]
    Show the premium content
[/s2If]
Posted: Wednesday Nov 7th, 2012 at 12:16 pm #30918
Sam Lee
Username: innocsrlee

Thanks a lot Raam, for bringing up the option of capabilities, that might actually provide an alternative.

Not wanting to generate buttons for each premium post, we could probably create PP form buttons in the template and target everything based on IDs, to differentiate between conditionals.

The issues that I’m foreseeing are:

  1. If using capability buy-now buttons, it doesn’t seem possible to limit the access time, rather it would grant perpetual access to that capability/premium content
  2. It would require membership, so each time a previous capability customer wants to purchase again, they need to login as otherwise they’ll probably add same account details again and it wont work in WP/S2Member as an account with those details already exists

To get around the first issue, I guess one could set an account limit, so that the account expires within a certain time, but that would get messy if they want to buy more capability access to other content within this timeframe.

But it’s a step forward, although I’m still not sure it’ll completely solve our issues.

On a different note, I’ve not had a chance to look into how capabilities are displayed in the member admin, but can one output a list of all the capabilities they have access to? Since we’ll use post IDs for those, we could then use the ID to get the permalink and be able to display a list of all their premium post access.

Posted: Wednesday Nov 7th, 2012 at 6:55 pm #30953
Raam Dev
Username: Raam
Staff Member

Hi Sam,

You are correct in that Custom Capabilities currently do not have any way of “expiring” and unfortunately I can’t think of a way around that at this time.

On a different note, I’ve not had a chance to look into how capabilities are displayed in the member admin, but can one output a list of all the capabilities they have access to? Since we’ll use post IDs for those, we could then use the ID to get the permalink and be able to display a list of all their premium post access.

Yes, you can loop through Custom Capabilities to see what the user has. This post by the lead developer includes such an example.

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.