Skip to Content Skip to Menu

Family Subscription

  • adhillon
  • adhillon
  • ONLINE
  • Posts: 134
  • Thanks: 6
  • Karma: 1
1 day 14 hours ago #342231 by adhillon
Family Subscription was created by adhillon
I have implemented Family subscriptions and shared a subscription.
How can I view the number of remaining subscriptions that can be shared. 
The test user has signed up additional subscriptions. I would like to view these too.
Please advise.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49656
  • Thanks: 8493
  • Karma: 1465
21 hours 2 minutes ago #342232 by krileon
Replied by krileon on topic Family Subscription
It doesn't directly say they've X of Y shares left. There's just a list of users they've shared to, which is accessed by the link at the bottom of their Subscriptions tab. The share button at the top goes away when they've hit their limit. If you're using a field for per-user share limits then you can simply just display that field to them and they'll see their share limit and if you want to show X of Y shares left you'd have to use CB Query Field and query for their current shares in the _cbsubs_family database table.


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.

  • adhillon
  • adhillon
  • ONLINE
  • Posts: 134
  • Thanks: 6
  • Karma: 1
20 hours 2 minutes ago #342233 by adhillon
Replied by adhillon on topic Family Subscription
I need your help with the CB Query Field procedure. Pls advise.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49656
  • Thanks: 8493
  • Karma: 1465
19 hours 24 minutes ago #342234 by krileon
Replied by krileon on topic Family Subscription
Below for example returns the number of people they've shared their plan with.
Code:
SELECT COUNT(*) FROM `#__cbsubs_family` AS f LEFT JOIN `#__cbsubs_subscriptions` AS s ON s.`id` = f.`sub_id` WHERE f.`user_id` = '[user_id]' AND s.`plan_id` = PLAN_ID_HERE

Replace PLAN_ID_HERE with the plan you want to query against. Extend with whatever additional checks you'd like. Example includes joining the subscriptions table. So for example you could join _comprofiler and run the math against your share limit field to return how many shares they have left or whatever you like really.


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