User group not being added upon subscription activation

7 years 3 months ago #290484 by cpaschen
We have 3 different subscriptions, 1 paid and 2 free.

The paid one is adding the assigned user group, but the free ones are not.

Both of the free subscription plans have ACCESS |SUBSCRIBERS USER ACCESS LEVEL SETTINGS | USER GROUP properly set to the group that should be assigned.

PAID SUBSCRIPTIONS | SETTINGS | GLOBAL -> Create Subscriptions also for free lifetime plans set to YES
(although "Allow Free Registered Users (without subscriptions) is set to NO - everyone must have one or more of the 3 subscriptions)

Is there some other place where I missed a setting?

CB Paid Subscriptions: 4.1.0+build.2017.01.17...
CB: 2.1.1
Joomla: 3.6.5
PHP: 7.0.x

Please Log in to join the conversation.

7 years 3 months ago #290489 by krileon
Are they free lifetime plans or do they have a duration configured? Have you tried using the below usage in CB Auto Actions?

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

I don't recall if free plans can manage usergroups, but it should be working ok assuming it's creating a subscription row.


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 to join the conversation.

7 years 3 months ago #290492 by cpaschen
Both are free/lifetime subscriptions.

The user is getting 'registered' added (although is the 'default').

We've had several different configurations for subscriptions during the development of this site so I'm guessing in all the configuring and un-configuring we must have 'broken' something.

The auto actions sounds like a perfect solution.
We'll just use that.

If there are problems with that I'll post back here, otherwise we'll just consider this resolved.

Thanks

Please Log in to join the conversation.

7 years 3 months ago #290493 by cpaschen
Well, I think I've narrowed down the issue (and there is still a problem).

We already have (had) an autoaction assigning groups to people when they register based on their age:

Global
Triggers: onAfterUserRegistration
User: Automatic
Access: Everybody
Conditions
1: [cb_age] Greater Than or Equal To 18


We have another one similar but with Contidion:
[cb_age] Less Than 18


Each of these was working fine, but when I disable those, the core (plan settings) groups get applied. But when those are enabled they aren't applied.

Any ideas?

We have to add both a 'subscription' group and an 'age' group to everyone that registers.

Please Log in to join the conversation.

7 years 3 months ago #290495 by cpaschen
It appears that if you have any UserGroup auto action enabled it overrides any custom usergroup assignment in free subscriptions.

So I found a work-around. I just merged the autoaction you recommended with the one I already had (age) and then apply both groups in that auto-action.
This wouldn't be an efficient work-around IF I had any more than 2 sets of 2 rules (no matter what I would need to have at least 2 group settings); however, if I had more of one type then the amount of auto-actions could get exponentially greater with each additional group that I needed to apply (to be able to test on all possibly combinations).

Hopefully it's possible to get this working so that multiple usergroup actions can be performed sequentially.

Please Log in to join the conversation.

7 years 2 months ago #290533 by krileon
What you're experiencing is a double save in the same operation. The free plans are applied instantly so their usergroup changes are instant. Your auto action is also instant. All of this happening on that trigger and neither of them knowing of each others existence. If the auto action is firing after CBSubs an easy fix is to enable Reload User under the Parameters tab of your auto action. Given that it overrides the CBSubs change it means it's firing after CBSubs so that should fix it for you.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.214 seconds

Facebook Twitter LinkedIn