[SOLVED] CBFields integration, value when plan is deactivated

9 years 11 months ago - 9 years 11 months ago #244752 by avateamcom
Hello,

I now use the cbfields-plugin for changing a new field called i.e. cb_test.
When plan is activated, cb_test is set to "helloworld" by cbfields correctly, but when plan is deactivated, field is not changed back to "none", it stays on "helloworld".
"Remove value on plan deactivation" is set to yes and as "Value on plan deactivation" I entered "none".

What can I do?

EDIT: I checked the triggers, and use onCPayUserStateChange to trigger the plan-deactivation. Is there a better trigger to use here?

Thanks!
-Stefan

Please Log in to join the conversation.

9 years 11 months ago #244858 by krileon


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.

9 years 11 months ago #244876 by avateamcom
Hey Kyle,

thank you for the information. It now works and the field is set back proberly.

But when using CB Auto Actions and Setting a Usergroup the usergroup is also not removed when subscription ends. I use the Trigger onCPayUserStateChange in both cases, add ing and removing the usergroup.

Thank you for your Support.

-Stefan

Please Log in to join the conversation.

9 years 11 months ago #244882 by krileon
The usage for CB Auto Actions is as follows.

Plan Active
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditional 1: [var3] Equal To PLAN_ID_HERE
Conditional 2: [var2] Equal To A

Plan Expired
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditional 1: [var3] Equal To PLAN_ID_HERE
Conditional 2: [var2] Equal To X

Beyond that I don't know what more to advise. I've already a ticket in place to investigate the Usergroup action as other users also reporting possible problems with it. If the above is not working then also try the below.

User: Manual - Variable 1

This will force the User object used to be the first variable of the trigger, which is the users user object. If still not working then try removing both conditionals to see if maybe the status or plan id checks are invalid.


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.

9 years 11 months ago - 9 years 11 months ago #244885 by avateamcom
Hi Kyle,

nope, any of your suggested variants do work, it seems, that the autoaction doesn't fire at all??

I tried it with another trigger "onUserLogout" to be able to check that and this works on the autoaction which has as condition "not equal to", the autoaction with condition "equal to" I limited the condition to "[var2]" equalto/notequalto "A" for testing..
So, may the condition a Problem?
I checked the database, the field is set to A, when the sub is active..

-Stefan

Please Log in to join the conversation.

9 years 11 months ago #244888 by krileon
Remove the conditionals and retest. You can also enable debug mode at the bottom of the auto action then enable debug mode and maximum error reporting in Joomla global configuration. Next test using the dummy gateway and it'll output errors if it failed for whatever reason. Aside from that I won't know more until after CB 2.0 when I investigate for a new release of CB Auto Actions.


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.
The following user(s) said Thank You: avateamcom

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.221 seconds

Facebook Twitter LinkedIn