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.

About: Andy Knott

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing 3 topics - 1 through 3 (of 3 total)
Topic Count Last Reply
Unable to auto-configure Amazon® CloudFront

By:  KB Armand in: Community Forum

voices: 10
replies: 21

3 years, 7 months ago  Michael Kang

Hide profile fields in front-end

By:  Maelle Gaultier in: Community Forum

voices: 5
replies: 5

4 years ago  James Cooper

Help – How do you Redirect to alternate page

By:  Adrian Clark in: Community Forum

voices: 2
replies: 5

4 years, 6 months ago  Andy Knott

Viewing 3 topics - 1 through 3 (of 3 total)

My Latest Replies (From Various Topics)

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Friday Jun 22nd, 2012 at 1:32 pm #17203
Andy Knott
Username: Me

Hi…

It looks as if I’m having the same problem when trying to configure CloudFront. I get the following error:

Unable to auto-configure Amazon® CloudFront Distributions.
Error code: 400. Error Message: Unable to create Amazon® CloudFront Downloads Distro. Unable to create Amazon® CloudFront Downloads Distro. Bad Request

I managed to set up S3/CDN fine… that’s all working as it should.

I’ve double checked I’m using the right keys and followed the video tutorial exactly.

I amended the /s2member/includes/classes/utils-urls.inc.php file and /wp-includes/class-http.php file as above… but no change.

The only thing I can think it might be is the way the server is set up maybe? The site is hosted on Media Temple’s Grid Servers…

Any help would be greatly appreciated.

Thanks,

Andy

Posted: Thursday Jun 21st, 2012 at 7:53 am #17105
Andy Knott
Username: Me

Re: upgrading. In the admin backend if you choose Users>All Users and then edit a user/member you’ll find a field called ‘custom capabilities’. In here will be the membership level signed up for.

i.e. I have a user with ‘level1’ in their custom capability form. If I now change that to ‘level1,level2’ they now have access to Level 2. If I change it to ‘level2’ only, they’ll have access to Level 2 but not Level 1.

As my brain is now hurting, I think what I’m going to do is create a form (using gravity forms so I can pre-populate some user data like first and surname) and stick it in the Upgrades page, so that they request/send a message to upgrade. I’ll then change manually via the custom capability form (above) and PayPal manually.

Cheers…

Posted: Thursday Jun 21st, 2012 at 7:40 am #17102
Andy Knott
Username: Me

Hi Adrian… OK. This is what I’ve done and it seems to be working.

Step 1

I have 2 separate membership levels: Level 1 and Level 2. Level 1 can only access Level 1, level 2 can only access Level 2. Access to the levels are controlled by categories and tags, so if I either tag a piece of content with the tag ‘level1’ or place a piece of content in ‘level1’ category only Level 1 users will be able to see it.

I create ‘level1’ category and tag, and then ‘level2’ category and tag within WordPress

I’ll go on and explain how you get to sign up users and assign the relevant tags and categories to them.

Step 2

In the theme’s functions.php I added the following code:

#—————————————————————–
# Custom Capabilities
#—————————————————————–

add_action (“template_redirect”, “my_custom_capabilities”);

function my_custom_capabilities ()

{

if(has_tag(“level1”) && !current_user_can (“access_s2member_ccap_level1”))
{
header (“Location: “. S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}

else if(has_category(“level1”) && !current_user_can (“access_s2member_ccap_level1”))
{
header (“Location: “. S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}

else if(has_tag(“level2”) && !current_user_can (“access_s2member_ccap_level2”))
{
header (“Location: “. S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}

else if(has_category(“level2”) && !current_user_can (“access_s2member_ccap_level2”))
{
header (“Location: “. S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}

}

Step 3

I use PayPal Pro Forms to sign up members… Below is an example of the form/code I used in a page for signing up a user for Level 1 and again for level 2.

[s2Member-Pro-PayPal-Form level="1" ccaps="level1" desc="£14.95 GBP / Monthly ( recurring charge, for ongoing access )" ps="paypal" lc="" cc="GBP" dg="0" ns="1" custom="yourdomain.com" ta="0" tp="0" tt="D" ra="14.95" rp="1" rt="M" rr="1" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]

and for level 2

[s2Member-Pro-PayPal-Form level="1" ccaps="level2" desc="£14.95 GBP / Monthly ( recurring charge, for ongoing access )" ps="paypal" lc="" cc="GBP" dg="0" ns="1" custom="yourdomain.com" ta="0" tp="0" tt="D" ra="14.95" rp="1" rt="M" rr="1" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]

Step 4

I created a page called ‘Upgrades’

Step 5

In S2Member>General Options>Membership Options Page, I chose the ‘Upgrades’ page from the ‘Membership Options Page:’ drop down list.

Outcome

So now when a Level 1 member tries to view any content either tagged or categorised as ‘Level 2’, they get sent to the ‘Upgrades’ page… and vice versa.

To Do

Now I’ve just got to work out what to put on the upgrades page to upgrade a membership!!! Might have to do that process manually via payPal to increase the monthly sum and then add the additional tag/category into the user’s profile.

Hope that made sense!

Posted: Thursday Jun 21st, 2012 at 6:52 am #17086
Andy Knott
Username: Me

Thanks Adrian…

I’m going to try and research further. If I find anything that works I’ll post it here.

Thanks for sharing.

Andy

Posted: Saturday Jun 16th, 2012 at 10:48 am #16676
Andy Knott
Username: Me

Hi…

I too am looking for similar functionality and can’t seem to find a solution/option within s2Member.

Rather than products (as Adrian’s above) I have a number of different membership levels and have managed to split them up individually i.e. Level 1 membership has access to Level 1, Level 2 membership has access to Level 2 membership etc.

What I’m trying to do is if Level 1 tries to view some Level 2 content they get redirected to an upgrade page which gives them the option to upgrade to Level 2.

Also hope that makes sense. Don’t think it’s a million miles away from Adrian’s issue.

Any help greatly appreciated.

Andy

Posted: Tuesday Apr 17th, 2012 at 1:22 pm #11021
Andy Knott
Username: Me

I’m interested in this functionality also… Anyone any ideas how this might be achieved?

Viewing 6 replies - 1 through 6 (of 6 total)

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.