XF 2.2 Prevent a user or group from purchasing subscription

ecsuser

Member
I would like to prevent certain regular members from purchasing a yearly subscription. Any thoughts on how to accomplish this?

Regards
 
You would need to create another upgrade which can't be purchased, disable the other upgrade when that upgrade is active, and manually apply it to the member.
 
A bit of a faf, but I have done this by using a conditional to hide the account_upgrade template from that group, and also hide the link in account_visitor_menu for that group.
 
A bit of a faf, but I have done this by using a conditional to hide the account_upgrade template from that group, and also hide the link in account_visitor_menu for that group.
I would appreciate it if you could share how you got this to work as I am looking for a similar solution.
 
1 Remove the link out of template account_visitor_menu for user group id 31

Search for this bit of code

Code:
<xf:if is="$xf.app.userUpgradeCount">
            <li><a href="{{ link('account/upgrades') }}" class="menu-linkRow">{{ phrase('account_upgrades') }}</a></li>
        </xf:if>

And apply conditional for user group to not see it:


Code:
<xf:if is="{{!$xf.visitor.isMemberOf(31)}}">
        <xf:if is="$xf.app.userUpgradeCount">
            <li><a href="{{ link('account/upgrades') }}" class="menu-linkRow">{{ phrase('account_upgrades') }}</a></li>
        </xf:if>
        </xf:if>

2. Hide the whole upgrade page in template account_upgrade

At the top of that template

Code:
<xf:if is="{{!$xf.visitor.isMemberOf(31)}}">

And at the bottom

Code:
</xf:if>

Disclaimer: Don't blame me if it breaks your forum, have everything backed up first and test.
 
Back
Top Bottom