Create CB SUBS Plans based on number of connections

9 years 3 months ago #258667 by pranaydhruv
Replied by pranaydhruv on topic Create CB SUBS Plans based on number of connections
Hello Kyle,

Tried that and it worked on one plan, then i upgraded the user subscription to a new plan with a different number of connections. however the profile still reflects the old connection limit from previous plan. Tried to refresh, login logout etc. unsubscribe - resubscribe. but the connection limit dosent change.

Thanks
Prany

Please Log in to join the conversation.

9 years 3 months ago #258701 by krileon
All of your plans that control connection limit need to utilize CBSubs Fields to adjust the field value. If your plan is free lifetime then you need to ensure free lifetime plans are configured to create subscriptions in CBSubs > Settings > Global. If you're giving the user a subscription from backend through CB > User Management by editing the user then field values won't change as the user store happens after CBSubs changes the field value, which results in the user store overriding what CBSubs changed; be sure to be testing on frontend and not backend.


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 3 months ago - 9 years 3 months ago #258766 by pranaydhruv
Replied by pranaydhruv on topic Create CB SUBS Plans based on number of connections
Hello Kyle,

Made quite a few changes don't recall all but here are the major ones :-

1) removed pricing from all subscription for now, because for priced plans it takes the user to the dummy gateway which fails the user from subscribing.

2) went into cbsubs field under integration and create the connection limit from each plan.

now the connection limit field for each user gets updated to their limit as per their plan but they can go above their connection limit without Auto Actions kicking in. Please see the Screenshot of Debug.
Attachments:

Please Log in to join the conversation.

9 years 3 months ago #258800 by krileon
For the CB Auto Action with an ID of 2, the first conditional is failing when doing the following.

2 = 3

That of course is false so the condition is behaving as it should. If it's using the conditional as provided in my earlier reply then it's working fine. Their connection count is 2 and their limit is 3. They have not met their limit yet.


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 3 months ago #258949 by pranaydhruv
Replied by pranaydhruv on topic Create CB SUBS Plans based on number of connections
Hello Kyle,

I tried it numerous times after that have removed and added the connection limit field, and re-created the auto action too. And here is what i observed that for some reason the connection count of 2 reflected in the screenshot below is not correct because the user actually has 4 connections. Not sure why the number of connections is not getting updated on sending connection requests? and because the connections count is not getting updated the trigger is not firing the action as it thinks that count is still below limit.

What do you think ?

Thanks
Pranay

Please Log in to join the conversation.

9 years 3 months ago #258989 by krileon
It's probably only counting active connections. In that case you need to use CB Query Field with the below query to count the real number of connection rows. Then substitute it (e.g. [cb_myqueryfield]) instead of [connections].

SELECT COUNT(*) FROM `#__comprofiler_members` WHERE `referenceid` = '[user_id]'


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

Facebook Twitter LinkedIn