How would I display upgrade/downgrade options independently?

Need some help from the pros. I have a page of options (packages) members can upgrade and downgrade. I figured out how to “display” (Current Package) and “display” (Upgrade/Downgrade), linked to a bundled pro-form using […?s2p-option=X].

Would love to display either Upgrade or Downgrade based on package they currently have. As an example, member purchased package 4 and can upgrade to package 5 (display “Upgrade” only) but can also downgrade to packages 1,2,3 (display “Downgrade” only)

Is there a way I can do this? My first thought was an [else] statement but just can’t figure out the coding. Let me know if I need to clarify. Thank you!!

I should also mention I’m using 1 member level and custom capabilities for packages…

Statements will do the job, but don’t use [else] - don’t works always. Use two opposite statements instead.

1 Like

Thanks Krumch. How would you write the statements? That’s where I need some help, can’t figure it out.

@digitalwarrior You can use a Nested IF statement as I’ve shown below or just stick with four ordinary

[s2If current_user_can(access_s2member_package#]…[/s2If]

followed by a NOT (!) statement

[s2If !current_user_is(s2member_level1)]…[/s2If]

Read this article Example 8 & 9

I have not included the button code as you can generate that yourself I’m sure. So this set of statements checks that they are an existing member on your level 1 (and logged in of course) otherwise you’d show all your options (level0).

NOTE: If Member’s pay monthly, you should use a Modify Button to change an existing Member’s purchase and a Purchase button for someone who has no access to your packages. If you only have a one-off payment then just use Purchase Buttons for everything.

This also assumes your Custom Capabilities are called “package1”, “package2” etc. just change the name after “access_s2member_”

[s2If current_user_is(s2member_level1)]
[_s2If current_user_can(access_s2member_package4)]
You are on Level 4.

 Downgrade:
 buttonModifyToPackage3
 buttonModifyToPackage2
 buttonModifyToPackage1

[/_s2If]
[_s2If current_user_can(access_s2member_package3)]
You are on a Level 3.

 Upgrade:
 buttonModifyToPackage4
 
 Downgrade:
 buttonModifyToPackage2
 buttonModifyToPackage1

[_/s2If]
[_s2If current_user_can(access_s2member_package2)]
You are on a Level 2.

 Upgrade:
 buttonModifyToPackage3
 buttonModifyToPackage4
 
 Downgrade:
 buttonModifyToPackage1

[/_s2If]
[s2If current_user_can(access_s2member_package1)]
You are on a Level 1.

 Upgrade:
 buttonModifyToPackage2
 buttonModifyToPackage3
 buttonModifyToPackage4

[/_s2If]
[else]
Please Select Your Membership Level:

buttonPurchasePackage1
buttonPurchasePackage2
buttonPurchasePackage3
buttonPurchasePackage4

[/s2If]

1 Like