I am using the latest versions of Joomla, community builder and all of it's plugins.
Allow me to explain the situation.
My site has 2 paid membership plans but also allows registered members without any subscription at all. What differs is the abilities that each user has according to if they have paid for a plan or not.
And here comes the usecase that we can not find a solution for...
User registers. OK
After registration he has no plan assigned to his profile.
After a few days he derides to upgrade to plan A that gives him the ability to have more allowed photos in his cbGallery. On activation of the plan, the allowed photos field updates fine and everything is fine.
Example:
Field value when PLAN A is active becomes 100
So far so good...!
Now... when PLAN expires... then user becomes again a member with not any plan assigned to his profile, but we can not find any way to set the value of the field back to the desired (allowed photos field = 10)
We have tried...
1. CB fields changing on plan activation and deactivation: Works for activation but not for deactivation.
2. Auto Actions
GLOBAL...
Type: Field
User: Automatic
Access: Everybody
Triggers: OnCPayUserstatechange
CONDITIONS...
[var3] Equal to 11 (number of the plan)
[var2] Equal to X (also tried Not Equal to A)
ACTION...
Field: (the field that we want changed)
Operator: Set (Field = Value)
Value: 10
The result is that the field value does not change
The below works fine for toggling behavior on plan active or deactivate states.
Plan Active Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A
Plan Expired Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody Conditions
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Not Equal To A
However if you're setting the value using CBSubs Fields you should be able to reverse it as well using the below.
Field: FIELD_HERE
Operator: Set
Value: 100
Remove value on plan deactivation: Yes
Value on plan deactivation: 10
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.