wallet points for CB Subs automation -stopped working -solved

7 months 3 weeks ago #335071 by webiedesign
Hi there, This was working fine and we were ready to take it live.
( www.joomlapolis.com/forum/professional-members-support/245893-wallet-points-for-cb-subs-automation?start=6#334190 )
I updated all the plugins etc and now the plan no longer expires. I re-installed my former testing site without updates and compared the configurations and the only difference I see is that the Community Builders and plugins were updated so I am wondering what changes were made that would have affected this.
Also, please confirm that the fields being used can only be an Integer Number and not a text field. The client has entries that include decimal points and the Integer Number does not accept these as entries.

Mary
webie-design.com

Please Log in to join the conversation.

7 months 3 weeks ago #335074 by krileon
Plan expiration needs to be triggered. So you either need to visit the backend of CBSubs often, configure it to expire subscriptions on frontend, or setup a CRON task to regularly run the expiration check. This is explained and configured in CBSubs > Settings > Global. Note a subscription does not truly expire until the grace period has ended so if you've configured a grace period be sure you're checking back after that has ended.

As for integer vs text with decimals that should work fine since it type casts to float not integer so decimals should work. I do not recommend using a Text field type for this though use a Decimal Number field type, which will store in the database as float instead of text.


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 months 3 weeks ago #335100 by webiedesign
I have meticulously gone through the live site and compared it to the testing site. The live site was functioning properly and stopped working. The test site continues to work properly. The difference is the live site has updated Joomla,Community Builder, and CB Subs. The live site just renews and renews despite there being 0 points in the required field, the function subtracts them- but continues to renew despite there being 0 points in the field. This is not a grace period or cron trigger issue.Should I supply screen shots at this time or ?

Mary
webie-design.com

Please Log in to join the conversation.

7 months 3 weeks ago - 7 months 3 weeks ago #335114 by krileon
Then my guess is there's a condition problem in the auto action since it's responsible for doing the automatic renewal.

www.joomlapolis.com/forum/professional-members-support/245893-wallet-points-for-cb-subs-automation?start=0#334088

That would be Condition 3. It's possible the CBSubs Fields subtracting points is happening after CB Auto Actions. They both act on the same onCPayUserStateChange trigger so that's possible. Edit your auto action then under Parameters tab set the following and see if that resolves it.

Reload User: Yes

If still not working try moving the management of that field to CB Auto Actions as well then you can control the order of them executing. The below should work fine.

Global
Triggers: onCPayUserStateChange
Type: Field
User: Automatic
Access: Everybody
Conditions
Condition 1
Field: Custom > Value
Custom Value: [var3]
Operator: Equal To
Value: PLAN_ID_HERE
Condition 2
Field: Custom > Value
Custom Value: [var2]
Operator: Equal To
Value: X
Action
Field: SELECT_POINTS_FIELD_HERE
Operator: Subtract (Field = Field - Value)
Value: POINTS_COST_HERE

This should be ran before the renewal auto action so be sure the order is correct.


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 months 2 weeks ago #335158 by webiedesign
Thank you, the addition of both of these solutions has solved this issue. I appreciate your support.

Mary
webie-design.com
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.223 seconds

Facebook Twitter LinkedIn