[SOLVED] CBsubs Expiry in CB Field...?

12 years 5 months ago - 12 years 5 months ago #184390 by robbiemc
[SOLVED] CBsubs Expiry in CB Field...? was created by robbiemc
Hi

I've had a good look around the forums but can't find an answer to this.

Is it possible to display the CBsubs 'subscription' expiry date in a CB field on a profile...?

We are a NFP membership organisation and need this information to be available for browsers. I also need such a field to map across to SugarCRM.

Many thanks

Robbie
YNWA

Please Log in to join the conversation.

12 years 5 months ago #184469 by krileon
Replied by krileon on topic Re: CBsubs Expiry in CB Field...?

Is it possible to display the CBsubs 'subscription' expiry date in a CB field on a profile...?

You'll need to use incubator project CB Query Field to query the database for the information you're wanting so it can be displayed as a field.

I also need such a field to map across to SugarCRM.

Can probably use CB Auto Actions to synchronize the field to SugarCRM using database queries.


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 5 months ago #184494 by robbiemc
Replied by robbiemc on topic Re: CBsubs Expiry in CB Field...?
Hi Krileaon

I noted the CB subscriptions tab details a members current plan and includes the expiry date. Is it possible to point me in the right direction re a standard set up and which database table and field I should be looking for?

Regards

Robbie
YNWA

Please Log in to join the conversation.

12 years 5 months ago - 12 years 5 months ago #184508 by krileon
Replied by krileon on topic Re: CBsubs Expiry in CB Field...?

Is it possible to point me in the right direction re a standard set up and which database table and field I should be looking for?

The below query will output the expiration date.
SELECT DATE_FORMAT( `expiry_date`, '%Y-%m-%d %H:%m:%s' ) FROM `#__cbsubs_subscriptions` WHERE `user_id` = [user_id] AND `plan_id` = PLAN_ID AND `status` = 'A'

Simply replace PLAN_ID with the ID of your actual plan. The above formats it to 0000-00-00 00:00:00 for example, but you're welcome to change the format to whatever you like.


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 5 months ago #184518 by robbiemc
Replied by robbiemc on topic Re: CBsubs Expiry in CB Field...?
Krileaon

Brilliant...many thanks for your help in this.

Works perfectly.

Robbie

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.185 seconds

Facebook Twitter LinkedIn