Skip to Content Skip to Menu

Create A Membership Summary List

  • bins
  • bins
  • OFFLINE
  • Posts: 465
  • Thanks: 40
  • Karma: 4
8 years 2 months ago #284877 by bins
Create A Membership Summary List was created by bins
Hiya,

to make some reporting easy, I would like to create an (admin only) page that simply lists the plan name and at least the number of active users in the plan.

It would also be great to show the number of expired users and maybe expiries in the next 30 days etc.

This can be a separate page from the core CB, but I am unsure how to call the totals. I appreciate that the total figures are shown in the plan list but am unsure how to pull them out to create the simple summary.

Anyone with ideas?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
8 years 2 months ago #284887 by krileon
Replied by krileon on topic Create A Membership Summary List
One option is to use CB Query Field and simple query the database for that information. Then display it on a custom page (e.g. maybe an article with CB Content Bot). Another is a userlist setup to filter users to your plan so it only shows users with an active or expired plan (can be specific or any plan). Then there's CB Auto Actions and a Code action with Method set to PHP where you could use CBSubs API to get that information, but you'd need to be pretty familiar with CB Auto Actions, PHP, and CBSubs API to do that. Userlist usage is by far the easiest to accomplish using an advanced filter. Example as follows.

Code:
( ( SELECT COUNT(*) FROM `#__cbsubs_subscriptions` AS sub WHERE sub.`user_id` = u.`id` AND sub.`status` = 'A' ) >= 1 )

The above should show any user with an active subscription of any kind for example.


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.

  • bins
  • bins
  • OFFLINE
  • Posts: 465
  • Thanks: 40
  • Karma: 4
8 years 1 month ago #284975 by bins
Replied by bins on topic Create A Membership Summary List
Thanks for the pointers.

One for the weekend, I think!

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

Moderators: beatnantkrileon
Powered by Kunena Forum