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.

How do I do this?

Home Forums Community Forum How do I do this?

This topic contains 2 replies, has 2 voices. Last updated by  zhiling zou 3 years, 11 months ago.

Topic Author Topic
Posted: Tuesday Feb 5th, 2013 at 12:16 am #40806

Hello,

I’m creating a tutorial site that allows me to post content to different categories. Subscribers will purchase content from different categories. I already have a all-categories listing page so subscribers can look at category overview and decide to purchase it, and each payment button for different gateways set up.
My question is, how do I grant access for these users? Also, I only need Level 1 to sign up, granting them no access to any category/post content (and no fee of course), only after they choose their tutorial, they will pay for that particular category. Other user level will not be allowed to sign up (but allowed to set up in the backend, which is already included in your plugin)

Angela

Edit: I think I figured out part of the story.
1- Whenever subscriber creates a post, I will create a hook to automatically save the category ID as the custom capability.
2- When subscriber buys contents from a category, I’ll be selling them the custom capability. I noticed that there is a difference here between the selling membership and selling custom capability, especially that in level attribute. If I would like to sell this to only level 1 members, should I use the first one or test for current user level and use the second shortcode?

[s2Member-Pro-AliPay-Button level="1" ccaps="1" desc="Description and pricing details here." custom="idu.local.host" ra="150" rp="1" rt="L" image="default" output="anchor" /]

[s2Member-Pro-AliPay-Button level="*" ccaps="1" desc="Description and pricing details here." custom="idu.local.host" ra="50" rp="1" rt="L" image="default" output="anchor" /]

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Tuesday Feb 5th, 2013 at 5:13 am #40838
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

If you want to sell this ONLY to Level #1 Members, please wrap your Shortcode in Simple Conditionals like this.

[s2If current_user_is(s2member_level1)]
	[s2Member-Pro-AliPay-Button level="*" ccaps="category_1" desc="Description and pricing details here." custom="idu.local.host" ra="50" rp="1" rt="L" image="default" output="anchor" /]
[/s2If]

You want to use level="*", so that you’re only adding new Capabilities and not modifying their existing Role.
See: Dashboard -› s2Member® -› AliPay® Buttons -› Capability (Buy Now) Buttons

Related articles:
Knowledge Base » Simple Shortcode Conditionals
Video » s2Member (Custom Capabilities)

Posted: Tuesday Feb 5th, 2013 at 10:02 pm #40890

Thanks for the answer. Haven’t used S2member in a long time, forgotten some basics :)

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