Hiding Package based on Membership Level

Hi,

We’re using S2 to register people to add GeoDirectory places. There are 3 Levels based on price which gives them different options when adding a listing.

Level3 can add free listings for X amount of days
Level2 can add listings at £75 per month
Level1 can add listings at £50 per month

So in theory depending on which Level the user registered at they should only be able to add a new place based on their package.

We’ve set restrictions on items under Invoicing > Items. So in theory only users with Level3 Access can select the free listing. However, users with Level2 and Level1 can select any of the packages. This basically makes the idea of different sign up fees redundant.

Reading S2 guide it would seem Post Level Access Restrictions won’t work as such the Items aren’t viewed. They are used to build radio select options - see attached.

URI Level Access Restrictions doesn’t work because if we post in the links that are only available to Level3 say when clicked in the front end the user just redirected to the homepage.

We want to hide the options based on level.

So if I’m a Level1 I don’t get to see options that are available to Level2, Level3 etc.

Simple Shortcode Conditionals looks to be the way to go but we’re not sure how to implement that.

Any advice would be appreciated.

You can hide the links by enclosing them within [s2If] conditional tags.

To do that would we have to amend the template to incorporate the [s2if] conditional tags?

Currently the GEO Directory plugin geodir_payment_functions.php has this (sorry couldn’t paste HTML Code):

If you want to do it in templates, rather than within the content of a post or page, then I’d use regular PHP conditionals like this:

if ( current_user_can( 'access_s2member_level1' ) ) { 

}

You can find further info under API/Scripting -> Advanced/PHP Conditionals

hi,

I did that but it outputted the 3 packages (as above image) in each of the 3 conditional tags.

So yes the conditional tags work in theory but they still output the same values so somewhere it can’t see any relation to GEO Directory and S2 Member.