Page 1 of 1

custom post type

PostPosted: July 1st, 2010, 4:32 pm
by byronyasgur
is this possible to do with s2member?

I would create a new custom post type. I would then allow site members to create new custom posts within this type and i want to have these automatically available to other members each for individual purchase. I think it maybe would be done using the buy it now option ( that's if s2member supports custom posts) however am i right in saying that each indiviual job would have to be manually listed in the backend - but i would need this to happen automatically somehow so that on the creation of a new job it is automatically up for sale. I was thinking i could attach some kind of script to the submit button that would write the info direct to the databse where s2member would put it.

Re: custom post type

PostPosted: July 7th, 2010, 4:05 pm
by Jason Caldwell
Yes, definitely possible.
s2Member DOES support Custom Post Types in WP 3.0+.

Log into your WP Dashbaord, and go to:
s2Member -> General Options -> Post Access Restrictions

You are correct though, in order to build the dynamic Buttons, and generate a list of Posts; all of that functionality needs to be done through some custom coding, or through another plugin perhaps.

Re: custom post type

PostPosted: July 7th, 2010, 4:06 pm
by Jason Caldwell
s2Member's Specific Post/Page Access restrictions also support Custom Post Types.

Re: custom post type

PostPosted: January 25th, 2011, 5:17 am
by Walton
I'm finding that I can't generate a button for Custom Post types protected by Specific Post/Page Access.

I did a test regular post, and that shows up fine on my list of protected posts/pages, but my custom post type post, doesn't.

Re: custom post type

PostPosted: June 3rd, 2011, 11:43 pm
by dartd
Same here. I created a custom post type to use for creating e-books.
I take the post id created though and go into Specific Post/Page Access Restriction and add the id.
Hit save and it keeps the id stored in there.
Then i go to Button Code Generator For Specific Post/Page Buttons but it does not give the option to create a button for this post id.
I have created a post and protected it using the same method and this will appear in the drop down in the button generator.

Re: custom post type

PostPosted: June 4th, 2011, 12:34 am
by Cristián Lávaque
Have you protected the page with any other restriction before trying to use the Specific Page one?

From the docs WP Admin -> s2Member -> General Options -> Specific Post/Page Access Restrictions

Post/Page IDs in comma-delimited format. Example: 1,2,3,34,8,21 * Note... the word all does NOT work here. Also, please be careful not to create a conflict with other Access Restrictions. If you are going to sell Specific Post/Page Access, you should enter specific Post/Page IDs here; and make SURE that you've NOT already protected any of these Posts/Pages with Member Level Access Restrictions. In other words, if you configure s2Member, in such as a way, that a Post/Page requires Membership Level Access, you cannot sell that same Post/Page through Specific Post/Page Access. Doing so, would create a conflict. Customers that purchased Specific Post/Page Access, would be unable to access the Post/Page - without also having a Membership. Not good. So be careful with this.

Re: custom post type

PostPosted: June 4th, 2011, 12:38 am
by dartd
Nope no other protection.

Re: custom post type

PostPosted: June 4th, 2011, 12:45 am
by Jason Caldwell
Thanks for reporting this important issue.
~ and thanks for the heads up Cristián.

Here are some things that s2Member scans over,
in order to prevent potential conflicts from occurring with Specific Post/Page Access.

Specific Posts/Pages CANNOT be ...
Code: Select all
- Your Membership Options Page
- Your Home Page
- Your Login Welcome Page
- Your Download Limit Exceeded Page ( if allowing Downloads )
- Any Page that is already protected with standard Page Access Restrictions ( i.e. Membership Protection ).
- Any Post that is already protected with standard Post Access Restrictions ( i.e. Membership Protection ).

If you can confirm again please that your installation meets these requirements? If all else fails, please send a Dashboard login through this private contact form. We'll be happy to take a look for you: http://www.s2member.com/contact/

Re: custom post type

PostPosted: June 4th, 2011, 1:10 am
by dartd
Hi Jason,

I had checked all of the above but i just double checked and sent you off an email with details for dashboard login.

Re: custom post type

PostPosted: June 4th, 2011, 1:16 am
by Jason Caldwell
Thanks. I'm taking a look now.

Re: custom post type

PostPosted: June 4th, 2011, 1:31 am
by Jason Caldwell
Bug found. Thanks for your assistance in reproducing this.
I've identified the source of the issue, and a fix will be included in the next official release of s2Member 110604+. Until then, you should be good. I've updated your installation with a fix for this specific issue.

/s2member/includes/menu-pages/paypal-buttons.inc.php; lines #575-577, should just be:
Code: Select all
$ws_plugin__s2member_temp_a_pp = ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"]) ? (array)get_posts ("post_type=any&include=" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"]) : array (); 

Re: custom post type

PostPosted: June 4th, 2011, 1:34 am
by dartd
Wow. That was quick!!!!
Thank you very much!

Re: custom post type

PostPosted: June 4th, 2011, 10:46 am
by Jason Caldwell
You're VERY welcome!
Thank you for reporting it to us.