Skip to Content Skip to Menu

Obtain a list of new subscribers from the front end?

  • wintercorn
  • wintercorn
  • ONLINE
  • Posts: 113
  • Thanks: 13
  • Karma: 1
2 days 11 hours ago #340466 by wintercorn
Can this be done via user lists where there is no previous sub (since x date) so a completely new subscriber? The backend lists are too complex for a client to attempt.
Thanks

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48891
  • Thanks: 8358
  • Karma: 1450
2 days 11 hours ago #340469 by krileon
You can filter a userlist based off subscription using the below Advanced Filter usage. These are just some examples and you can extend them however necessary like checking for different statuses or specific date range.

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

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

This isn't filtered to a specific plan. If you only want to show from a specific plan you'd use the below for example.

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

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

Be sure to replace PLAN_ID_HERE with your actual plan 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 or Create an account to join the conversation.

  • wintercorn
  • wintercorn
  • ONLINE
  • Posts: 113
  • Thanks: 13
  • Karma: 1
16 hours 40 minutes ago #340495 by wintercorn
So how would I edit that to show the oldest subs first?  

It seems very hard to just get a usable list of subs with name, email and sub type for a non-technical client to read and understand. The CB user export does contain most of the info except sub start date and sub type and the CBSUBS export contains that but no user data other than user id.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48891
  • Thanks: 8358
  • Karma: 1450
13 hours 13 minutes ago #340497 by krileon
The above is just filtering them. To sort them by subscription date you'd need to set Sorting to Advanced then use the following.

Active Any
Code:
( SELECT sub.`subscription_date` FROM `#__cbsubs_subscriptions` AS sub WHERE sub.`user_id` = u.`id` AND sub.`status` = 'A' ) DESC

Active Specific Plan
Code:
( SELECT sub.`subscription_date` FROM `#__cbsubs_subscriptions` AS sub WHERE sub.`user_id` = u.`id` AND sub.`status` = 'A' AND sub.`plan_id` = PLAN_ID_HERE ) DESC

Both the above are descending. Change DESC to ASEC to sort ascending. They're sorting by subscription date, but you could sort by expiration, renewal date, etc.. As with the filtering you can change what status to sort by. So from A to X would sort by expired.

It seems very hard to just get a usable list of subs with name, email and sub type for a non-technical client to read and understand.

Is CB > User Management not sufficient for this? It has a Subscriptions column to show what subscriptions they have. This column can also be sorted (sort dropdown or by clicking its column title) and filtered (under Search Tools) on in CB > User Management. There's also CBSubs > Subscriptions page. What I've would recommend for non-technical users is use Joomla's built in Tour Guides feature. This lets you make guides to using backend that will walk them through things so they can understand how to use them.


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

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

  • wintercorn
  • wintercorn
  • ONLINE
  • Posts: 113
  • Thanks: 13
  • Karma: 1
11 hours 12 minutes ago #340500 by wintercorn
That works well. Thanks. Any way to download that user list as a file?

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

  • wintercorn
  • wintercorn
  • ONLINE
  • Posts: 113
  • Thanks: 13
  • Karma: 1
10 hours 58 minutes ago #340501 by wintercorn
Sorry, also how do I show only users joined since a certain date, say September 2023?

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

Moderators: beatnantkrileon
Powered by Kunena Forum