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.

Custom Capabilities Or Specific Posts/Pages

Home Forums Community Forum Custom Capabilities Or Specific Posts/Pages

This topic contains 10 replies, has 3 voices. Last updated by  WeSEO.In 3 years, 7 months ago.

Topic Author Topic
Posted: Friday May 31st, 2013 at 11:52 am #51057
WeSEO.In
Username: weseoin0712

I have 3 different products, and for each product I plan to have an order page with s2m generated Buy Now button. When anyone buys a product he gets access to its product content page that has downloadable links.

So far, okay..

Now for each product I want to use a timer plugin. When a visitor comes to the order page of the product he is offered 50% discount if he buys within say 10 minutes. After 10 minutes, the order page automatically changes to the full-price order page for the same product.

That means, for each product there are 2 order pages – one with discount price and the other with full price – but the content page is the same.

Hope I could explain…

I’m not sure which of the 2 – Specific Posts/Pages or Custom Capabilities – is suitable for my need.

Please help.

List Of Topic Replies

Viewing 10 replies - 1 through 10 (of 10 total)
Author Replies
Author Replies
Posted: Friday May 31st, 2013 at 10:08 pm #51100

You could create a customization to do that.

The order button/pro-form can be changed dynamically using a variable (e.g. from the URL, from a cookie, the session) after the page gets reloaded. Knowledge Base » Using Variables In A Shortcode

To do the refresh after the 10 mins, you’d need a bit of JavaScript, or have an HTML refresh header for that page.

Posted: Saturday Jun 1st, 2013 at 12:47 am #51114
WeSEO.In
Username: weseoin0712

Thanks Christian for your reply.

I’ll be using the ‘Scarcity Samurai’ plugin for redirection. That’s not the problem.

So anyone more than 10 minutes in the discount page will automatically get redirected to the non-discount page. and I can always have separate buy-now button for each page.

My problem is how to make available the same content page to both the discount and non-discount buyers.

I’m inclined to go with Specific Posts/Pages as I am not clear about using custom capabilities for this purpose. But I really cannot make up my mind.

If I use specific posts/pages, will I have the record of buyers in the WordPress users’ list? Suppose someone asks for refund. How can I refund if I don’t have record in the users’ list?

Posted: Saturday Jun 1st, 2013 at 3:29 am #51119

My problem is how to make available the same content page to both the discount and non-discount buyers.

Oooh, I see. Sorry I missed that before. You don’t have to worry about it, just sell them the same access at different prices, the access won’t be different. If you sell someone Level 1 access for $1, another guy for $100, and another for free, they’ll all have the same Level 1 access. The same is true for custom capabilities.

If I use specific posts/pages, will I have the record of buyers in the WordPress users’ list? Suppose someone asks for refund. How can I refund if I don’t have record in the users’ list?

No, these aren’t tied to user accounts, the access is done with a link that includes the access validation. And you can’t disable these access links, the only way would be to remove the page, but then you’d struggle with every other person that purchased the access to it.

I would go with custom capabilities if you don’t need one of these restrictions which are mostly based on levels: [hilite path]Dashboard -› s2Member® -› Restriction Options[/hilite]

Video » s2Member (Custom Capabilities)

Posted: Saturday Jun 1st, 2013 at 10:50 am #51136
WeSEO.In
Username: weseoin0712

Ah well, I see the point. Let me figure it out. But if I find myself not out of the woods, I’ll come back for help.

Thank you.

Posted: Sunday Jun 2nd, 2013 at 2:44 am #51158

Sure. Let us know if you have another question.

Posted: Sunday Jun 2nd, 2013 at 8:06 am #51170
WeSEO.In
Username: weseoin0712

I was looking at Custom Capabilities.

As I understand I can add a custom capability to a Buy Now button, and then use that specific capability to restrict access within a page. To do this I need to append the code “access_s2member_ccap_music” to control access to certain portions of a page.

Now, suppose I add custom capability to a whole page by adding a qualifier – say, music – in the space provided on the right in the Add New Page.

In this case, will I be able to control access to the whole page? For example, I can use the following code on the Login Welcome Page. Is that possible?

[s2If current_user_can(access_s2member_level1)]

    You have access to the following course:

    [_s2If current_user_can(access_s2member_ccap_music)]
        Click here to go to the Music course page..
    [/_s2If]

[/s2If]
Posted: Tuesday Jun 4th, 2013 at 4:35 am #51279
Bruce
Username: Bruce
Staff Member

As I understand I can add a custom capability to a Buy Now button, and then use that specific capability to restrict access within a page. To do this I need to append the code “access_s2member_ccap_music” to control access to certain portions of a page.

This is correct so far.

Now, suppose I add custom capability to a whole page by adding a qualifier – say, music – in the space provided on the right in the Add New Page.

In this case, will I be able to control access to the whole page? For example, I can use the following code on the Login Welcome Page. Is that possible?

You can always use Shortcode Conditionals in Posts/Pages. If you’re protecting your Post/Page with a Custom Capability, s2Member will require that anyone attempting to reach this Post/Page have that Custom Capability. You are restricting access to their entire Post/Page, and the User will be redirected to the Membership Options Page if they do not have access.

If you don’t want to redirect Users to the Membership Options Page, use Conditionals to protect certain parts of your content on the page.

Posted: Tuesday Jun 4th, 2013 at 6:06 am #51309
WeSEO.In
Username: weseoin0712

Thanks Bruce.

You’re right, but if a person has the access to the content page through the ccap-enabled buy-now button, then surely there is no harm?

Posted: Tuesday Jun 4th, 2013 at 6:18 am #51311
Bruce
Username: Bruce
Staff Member

You’re right, but if a person has the access to the content page through the ccap-enabled buy-now button, then surely there is no harm?

You could also restrict content based on Custom Capabilities within a Post/Page that’s restricted by Membership Level/Custom Capability just fine, and that’s fine too. I think that’s what you’re asking here but correct me if I’m wrong.

Posted: Tuesday Jun 4th, 2013 at 6:31 am #51313
WeSEO.In
Username: weseoin0712

Thanks Bruce.

After Christian put me in the right direction that CC is my best option (#51136 above) and not specific post/page, I was thinking of using a whole page for CC instead of using shortcode conditionalities……

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