Skip to Content Skip to Menu

[SOLVED] Membership Upgrade available with Conditional Statements

7 years 5 months ago - 7 years 5 months ago #294354 by craschnburn
Hello.

Thanks in advance for your attention.

Specifications
Joomla 3.6.5
CB 2.1.2
CBSUB 4.1.0 <- I have that error which in the settings the version has "?" instead of the version numbers.. I read that this is of no pertinent issue.....

Memberships
I created 4 Memberships. Each membership have individual condition which needs to be met in order to offer the upgrade in the user's profile.

Membership 1 are Registered users [free lifetime]
Membership 2 are Authors [yearly fee, must be approved to upgrade]
Membership 3 are Editors [free lifetime, must be approved to upgrade]
Membership 4 are Publishers [free lifetime, must be approved to upgrade]

Process
I'd like to dedicate the Publishers capability to manage the fields in the users' profiles of Membership 1 to 3 in the front end.
I have 3 fields which are editable by Publishers only, but view-able by the owner themselves. Owners are prohibited from editing the field. This field will trigger the upgrade possibility from 1 to 2 and from 2 to 3 and 3 to 4. The Publisher will manage users and enable their possible upgrade. The user them will upgrade from their user profile.

My issue
My problem is the configuration of each plan, and utilizing the Dates / CB Fields Comparisons of conditions to allow users to upgrade to the dedicated plan.
I see that I am able to use Following CB Field to compare Value A with Value B. If that statement is true then the upgrade is allowed.

1. Can you help me with a logic example of how to achieve this process with the upgrade conditions?
2. I see that I can use constant value or string (cb_substitutions). Does this mean I can use if a checkbox is true, then allow this upgrade plan? If so, how with the setup and configuration in the plan?

I hope this doesn't come as ramble. I'm in trouble if I'm the only one that understands this......

Please help.

I can grant Admin access for you if you need.


Thank you,
Tom
Last edit: 7 years 5 months ago by krileon. Reason: Added [SOLVED] tag to subject

Please Log in or Create an account to join the conversation.

7 years 5 months ago #294356 by craschnburn
Or if anyone can direct me to some good tutorials for configuring the Dates / CB Fields Comparisons of static conditions. I haven't been able to find a good one. I'm just trying to learn this stuff.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 5 months ago - 7 years 5 months ago #294394 by krileon

I'd like to dedicate the Publishers capability to manage the fields in the users' profiles of Membership 1 to 3 in the front end.

Not possible without making them CB Moderators, which has far reaching power to adjust quite a bit of content beyond just profile data.

2. I see that I can use constant value or string (cb_substitutions). Does this mean I can use if a checkbox is true, then allow this upgrade plan? If so, how with the setup and configuration in the plan?

Yes, see the below example.

Date A, Field A or Value A: Following CB field
CB Field A: FIELD_HERE
Date B, Field B or Value B: Constant Value or String (CB substitutions can be used)
Value B: 1
Condition 1 (> for Dates): A = B (Value A is equal to Value B )

That should only allow upgrade if the selected checkbox field is checked. Checkbox fields store as 1, 0, or NULL. It's best to check for either equal to 1 for checked or not equal to 1 for unchecked.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 7 years 5 months ago by krileon.

Please Log in or Create an account to join the conversation.

7 years 5 months ago #294503 by craschnburn
Hey Kyle.
Thanks for your reply.

It makes a lot of sense from what you're stating.

So I tried the the Dates / CB Fields Comparisons settings you advised, and its not working. So instead, I thought I played around with it for a little bit, utilizing the same expression you shared.

Date A, Field A or Value A: Following CB Field
CB Field A: cb_staffapproved
Date B, Field B or Value B: Constant Value or String
Value B: 0
Condition 1(> for Dates): A > B (Value A is larger than Value B)

That still didn't work.

But I did try the following which seemed to work for a bit then quit on me for some reason.

I chose:
First static condition: This condition must be NOT be met to allow upgrades:

Date A, Field A or Value A: Following CB Field
CB Field A: cb_staffapproved
Date B, Field B or Value B: Constant Value or String
Value B: 0
Condition 1(> for Dates): A = B (Value A is larger than Value B)


It's still not working. i was wondering if I can send you Admin Access to assist me in diagnosing.

Thanks in advance.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
7 years 5 months ago #294519 by krileon
What do you mean by it's not working? The plan isn't showing for them to upgrade or it's showing to everyone regardless? There are other access parameters associated with a plan that you also need to ensure are set correctly. For example ensure the view access level and usergroup checks are set to Public under the Access tab and within CBSubs > Settings > Global ensure Upgrades are enabled on a global scale.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

7 years 5 months ago #294535 by craschnburn
Well.

It's not showing for them to upgrade. All conditions identified in the plan settings itself are fulfilled from the user's end. But its not offering the user the upgrade. I performed a trial and error of changing some settings from

I attached a screen shot of the Workflows tab settings. This is just an example of one setting. I've actually tried multiple settings that are similar or passes the same type of statement.

I switched the First static condition to "This condition must not be met in order to allow upgrade", and selected the plans which they shouldn't have. I then set the Condition 1(> for Dates) as A<>B A is different than B. This actually worked for me for a bit before it just allowing the user to upgrade regardless of what I set on the user's end.

I'll play with it a little bit more, and update the thread of my results.

I'd really like to give you admin access to diagnose. We can post whatever the results back on here afterwards. Please let me know what you think of your thoughts.

Thanks for everything that you all do.
Great work.
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum