reset rating field?

7 years 11 months ago #282473 by michaelgreen252
reset rating field? was created by michaelgreen252
is there any way to reset a users rating field back to 0 with auto actions after plan expiration? thanks

Please Log in to join the conversation.

7 years 11 months ago #282478 by krileon
Replied by krileon on topic reset rating field?
You can use the below with a Field action to alter the value of a field based off subscription status.

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

Can also use CBSubs Fields integration.


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: nant

Please Log in to join the conversation.

7 years 11 months ago #282520 by michaelgreen252
Replied by michaelgreen252 on topic reset rating field?
Thanks..
im a bit confused about 2 things here..so. if my plan id is 23 then step 1 should look like this
1: [var3] Equal To 23

but step 2 (should i leave it as A or am i supposed to supplement this with something?
2. [var2] Equal To A (is this left as A)

(a am now looking at the action tab within the auto action to set a field action as you noted above the plan settings...i cannot locate any options here to refer to my tab)

3..What are the commands that i need to input to select rating field a,b,c and make the value 0 after expiration? thanks

.....................
you also stated i can so so in cbsubs fields integration..To further understand the configs for field integration in case i wanted to explore

so under fields integration i can see this
CB Fields
1. Field = my rating field (cb_hats_rating0
2. Operator = Add: Field = Field + Value
3. value = 0 (if i wanted to add 2 stars would i just make value 2?)
4. remove value on plan deactivation = yes
5. value on plan deactivation = 0

Is this correct?

Please Log in to join the conversation.

7 years 11 months ago #282531 by krileon
Replied by krileon on topic reset rating field?

m a bit confused about 2 things here..so. if my plan id is 23 then step 1 should look like this
1: [var3] Equal To 23

but step 2 (should i leave it as A or am i supposed to supplement this with something?
2. [var2] Equal To A (is this left as A)

All you need to change in the supplied example is the action you're going to use and PLAN_ID_HERE to your actual plan id.

3..What are the commands that i need to input to select rating field a,b,c and make the value 0 after expiration? thanks

Select the field you want to change. Select the operator for how you want to change it (in your case "Set"). Then input the value to change it to (in your case 0).

Is this correct?

No, if you're wanting to set it to 0 then use the "Set" operator, not the "Add" operator.

It's possible just setting the field to 0 won't do the trick and may require you to clear the database table _comprofiler_ratings for that field. So it could require 2 auto actions; 1 to change the field value and 1 to alter the database.


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.209 seconds

Facebook Twitter LinkedIn