CB Subs Data to create a CB List

5 years 6 months ago #307428 by jhurlbur
CB Subs Data to create a CB List was created by jhurlbur
Is there a way to use the status field in cbsubs to create a list on the frontend based upon a status field value ? I would like to make available to my membership managers a list on the front end to be able to go in and mark offline payments as paid..

Please Log in to join the conversation.

5 years 6 months ago #307435 by krileon
Replied by krileon on topic CB Subs Data to create a CB List
It's possible to filter the userlist to users who are actively subscribed or expired using Advanced filters. Examples as follows.

www.joomlapolis.com/forum/149-usage/239397-cb-list#305820

To filter based off pending payments for offline payments usage is similar using Advanced filters, but you'd need to check for baskets. Something like the below might work.

( ( SELECT COUNT(*) FROM `#__cbsubs_payment_baskets` AS bsk WHERE bsk.`user_id` = u.`id` AND bsk.`payment_status` = 'Pending' ) >= 1)

That should display every user with a pending basket. If you want it to be specific to your offline payment gateway you'll need to extend the query to filter by the payment gateway id as found in CBSubs > Gateways. Example as follows.

( ( SELECT COUNT(*) FROM `#__cbsubs_payment_baskets` AS bsk WHERE bsk.`user_id` = u.`id` AND bsk.`gateway_account` = GATEWAY_ID_HERE AND bsk.`payment_status` = 'Pending' ) >= 1)

Replace GATEWAY_ID_HERE with the actual id of your payment gateway.


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.

5 years 6 months ago #307438 by jhurlbur
Replied by jhurlbur on topic CB Subs Data to create a CB List
The query works but how do you add column names to the list ? It would be helpful to have at least username but it doesn't appear in the columns list as an option.

Please Log in to join the conversation.

5 years 6 months ago #307454 by krileon
Replied by krileon on topic CB Subs Data to create a CB List
You can only select fields for display on a userlist that are already set to display on profile. If you don't want them actually displayed on profile be sure to move them to a tab that is in a not shown on profile position.


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.

5 years 6 months ago #307463 by jhurlbur
Replied by jhurlbur on topic CB Subs Data to create a CB List
i have added the filter query to a cblist that displayed just username and a send email link. after applying the filter it correctly filters down to those members with a pending payment. But I only get 1 record returned even though there are more pending. Is that because of the Count option which would return only one record ?

Please Log in to join the conversation.

5 years 6 months ago #307506 by krileon
Replied by krileon on topic CB Subs Data to create a CB List
It's not going to display the same user multiple times. It's a userlist and not a basket list. For that I guess you could try using CB Query Field and querying for how many pending baskets they have then set that field to display on your userlist, but you'll need to make the SQL for that against the _cbsubs_payment_baskets 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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.269 seconds

Facebook Twitter LinkedIn