Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount! Get 20% off now with code SPOOKY-2024!

CBSubs and AutoActions question on use case

  • liaskas
  • liaskas
  • OFFLINE
  • Posts: 382
  • Thanks: 36
  • Karma: 2
  • Add-ons
7 years 11 months ago #287987 by liaskas
Hello. We can not manage to make things work on the following use case.

3 plans

1. Free plan
2. Silver plan
3. Gold plan

What we need is when a member registers on 2 or 3 and registration expires, to auto assign to this member plan 1.

Plans 2 and 3 are not child plans and we do not want them to be.

So we created 2 auto actions

OnCPayUserStateChange
Type: CB Paid Subscriptions
User: Automatic
Access: Everybody
Condition 1: [var3] equal to /^(2|3)$/
Condition 1: [var2] equal to A
Action: Delete Free plan


OnCPayUserStateChange
Type: CB Paid Subscriptions
User: Automatic
Access: Everybody
Condition 1: [var3] equal to /^(2|3)$/
Condition 1: [var2] equal to X
Action: Subscribe Free plan

Things that do not work.
When subscriptions to plans 2 and 3 are activated, plan 1 is not auto deleted.
When subscriptions to plans 2 and 3 expire, plan 1 is not auto assigned.

Can you please advise?

Thank you in advance.

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

  • liaskas
  • liaskas
  • OFFLINE
  • Posts: 382
  • Thanks: 36
  • Karma: 2
  • Add-ons
7 years 11 months ago #288006 by liaskas
Replied by liaskas on topic CBSubs and AutoActions question on use case
Also please tell me if there is another way to do what we need without using Auto Actions, because Auto Actions scrambles the users passwords each time we assign or change the subscription plan of any member!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
7 years 11 months ago #288007 by krileon
Replied by krileon on topic CBSubs and AutoActions question on use case
Below is the exact usage for the two different plan states. Your usage looks ok, but try using it against a single ID as shown below to see if it works. Please also ensure CB Auto Actions is public and published within CB > Plugin Management.

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

Also please tell me if there is another way to do what we need without using Auto Actions, because Auto Actions scrambles the users passwords each time we assign or change the subscription plan of any member!

That should not be possible. Please ensure you've latest CB and CB Auto Actions installed.


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.

  • liaskas
  • liaskas
  • OFFLINE
  • Posts: 382
  • Thanks: 36
  • Karma: 2
  • Add-ons
7 years 11 months ago #288008 by liaskas
Replied by liaskas on topic CBSubs and AutoActions question on use case
I have done it like with a single plan id and it works sometimes. Some times it does not work.

What can we do if we have three or more plan ids? Do we have to create 2 auto actions for each plan id?

I need to make more plans than the three i already have.

All my versions... Joomla, Community builder and CBSubs plugin are the latest.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
7 years 11 months ago #288021 by krileon
Replied by krileon on topic CBSubs and AutoActions question on use case
There should be no sometimes works and sometimes doesn't. If your free plan is free lifetime then ensure you've enabled creating subscriptions for free lifetime plans within CBSubs > Settings > Global as that's the plan I'm guessing where it sometimes doesn't work.

For more than one plan you need to use the REGEX you used, but be sure to change the operator to "Is REGEX" as you've REGEX supplied with the operator set to "Equal To".


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.

Moderators: beatnantkrileon
Powered by Kunena Forum