[SOLVED] How to recognize Trail from Full access in cbsubs

12 years 2 months ago - 12 years 2 months ago #194371 by tto
Hello,

We have one plan in cbsubs, 24h trial and then 1 year full access after payment.

We are working on a custom script that need to recognize users with trial access from members with full access.

Which field we need to check in the database?

Thanks,

Regards,

Tariq

Please Log in to join the conversation.

12 years 2 months ago #194395 by krileon
A users subscription is stored in _cbsubs_subscriptions. Not sure which column you'd use for that as everything is calculated. My guess is if last_renewed_date is 0000-00-00 00:00:00.


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.

12 years 2 months ago - 12 years 2 months ago #194498 by tto
Hi Krileon,

What does the "status" column mean, and can we use that to filter "trial" members?

We have noticed the status show : A, C, R or X

Please advice,

Thank you

Regards,

Tariq

Please Log in to join the conversation.

12 years 2 months ago #194509 by krileon

What does the "status" column mean, and can we use that to filter "trial" members?

It's the current status of their subscription and no.

We have noticed the status show : A, C, R or X

A = Active
R = Registered Unpaid
X = Expired
C = Unsubscribed
U = Upgraded to other
I = Invalid

Ideally if the user is on a free trial it's the first time purchase of the plan so you'll want to first check that the "status" is "A" (Active) then check if "last_renewed_date" is equal to the date they subscribed (e.g. `subscription_date` = `last_renewed_date`). That would give you those who have subscribed once, but not yet renewed.


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.

12 years 2 months ago #194521 by tto
Thanks Krileon :)

Regards,

Tariq

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.198 seconds

Facebook Twitter LinkedIn