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 packages and single pages

s2Member Plugin. A Membership plugin for WordPress®.

Custom packages and single pages

Postby cassel » May 23rd, 2011, 8:07 am

I am sure i saw this somewhere, but i cannot find it now.

I am setting up some custom packages, and it works fine for now. I have one ccap called "Webinar" that will be used to give access to ALL the webinars, but i am thinking of selling them ALSO individually. How would i configure it? By single page selling? Will that somewhat override the ccap?

I am thinking of one "paypal button" for the whole Webinar package, but also one paypal button for Webinar#1, one for Webinar#2, etc. Is that the way to go?
User avatar
cassel
Experienced User
Experienced User
 
Posts: 442
Joined: February 17, 2011

Re: Custom packages and single pages

Postby Cristián Lávaque » May 23rd, 2011, 1:10 pm

Yeah, you can use custom capabilities to identify and control access to each individually.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Custom packages and single pages

Postby cassel » May 23rd, 2011, 1:14 pm

So i can have 10 pages with the ccaps called "Webinar", but still sell them one by one by identifying them how? by page number? Would that work in addition to having a ccap name?

(it is clear in my head, just not sure i am clear when describing it! lol)
User avatar
cassel
Experienced User
Experienced User
 
Posts: 442
Joined: February 17, 2011

Re: Custom packages and single pages

Postby Cristián Lávaque » May 23rd, 2011, 2:29 pm

You can have the ccap for each webinar, and use the webinar's date to make each unique:

webinar110418
webinar110523

etc.

To grant someone access to all webinars, you can either update his profile adding new webinar ccaps as they come out, or have another ccap named webinars that'll give him access to all. To do the latter, though, you'll have to check the ccaps with conditionals instead of using the s2Member meta box when editing the post/pages.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Custom packages and single pages

Postby cassel » May 23rd, 2011, 2:37 pm

Yikes... and i thought it would be easy enough to sell the whole set named "webinars" and sell individual ones by page number :(
User avatar
cassel
Experienced User
Experienced User
 
Posts: 442
Joined: February 17, 2011

Re: Custom packages and single pages

Postby Cristián Lávaque » May 23rd, 2011, 2:49 pm

Well, you can simplify it if you post every webinar in the same page and show it or not using conditionals. This would make it simpler because you don't have create a page for each one, instead you create an array with all the webinar dates and then loop through it to show each webinar.

That said, it's not much trouble to use conditionals in all the webinar pages, just write a template conditional statement (not a theme template, just a template for your post that has the conditionals), and paste it in each webinar post you create. Basically something like

Code: Select all
<?php if (current_user_can('access_s2member_ccap_webinars') || current_user_can('access_s2member_ccap_webinar110525')) { ?>

// Show the webinar.

<?php } else { ?>

// Button to get this webinar or full access.

<?php ?>
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Custom packages and single pages

Postby cassel » May 23rd, 2011, 3:03 pm

Yeah, i guess that would work. Thanks
User avatar
cassel
Experienced User
Experienced User
 
Posts: 442
Joined: February 17, 2011

Re: Custom packages and single pages

Postby Cristián Lávaque » May 23rd, 2011, 3:46 pm

:)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Custom packages and single pages

Postby cassel » May 29th, 2011, 9:53 am

I am not at that point yet (the Webinar pages are not done), but i just got an idea: can you use wildcards in the conditionals? I am thinking that if all the webinar are identified with the dates (like Webinar-04, Webinar-05, etc.) so that individual pages could be purchased separately, but the whole package would be Webinar* ?

If the use of wildcards is not possible, could that be something to implement in future versions? Just a wild idea from a non-programmer!
User avatar
cassel
Experienced User
Experienced User
 
Posts: 442
Joined: February 17, 2011

Re: Custom packages and single pages

Postby Cristián Lávaque » May 29th, 2011, 12:09 pm

You can already achieve that with the conditionals, the code I showed you above does it, it checks if the user can access the particular webinar or any webinar.

What you suggest, though, would be interesting for the custom capabilities when used to protect a whole page. I'll show this to Jason to keep in mind. Thanks for the suggestion. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Custom packages and single pages

Postby cassel » May 29th, 2011, 12:27 pm

Your suggestion was about putting all the webinars on one page. I just thought it might become quite a long page over time, so i thought it would overcome that situation. I'll see how i manage when i get to that point.
User avatar
cassel
Experienced User
Experienced User
 
Posts: 442
Joined: February 17, 2011

Re: Custom packages and single pages

Postby Cristián Lávaque » May 29th, 2011, 12:41 pm

That was one of the suggestions, yes, but I also suggested in the second part of that reply, that you could have them all in their own pages and gave you a conditional template you could use. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

cron