[SOLVED] How to get the subscription type in code level!

12 years 9 months ago - 12 years 9 months ago #171901 by richard_zhuzhen
I need the code to judge what kind of subscription the user sign in.
Thanks a lot!

Please Log in to join the conversation.

12 years 9 months ago #171910 by nant

richard_zhuzhen wrote: I need the code to judge what kind of subscription the user sign in.
Thanks a lot!


Please give more details as I am not sure what you are asking?

Please Log in to join the conversation.

12 years 9 months ago - 12 years 9 months ago #171942 by richard_zhuzhen
Replied by richard_zhuzhen on topic Re: How to get the subscription type in code level!
In my project I intergrated sobi2 component with CB and CBsub. But I wish to customerize the sourcecode of sobi2 because some function has relationship with the user's subscription type. So I need to judge what kind of subscription the user log in. Can you give me the example sourcecode(PHP) about how to do this.

For example: $cbUser =& CBuser::getInstance( $_CB_framework->myId() ); //This code told me how to get the instance of CBuser, so I can get all the property of the instance like username, usergroup etc.

By the way, are there any documents to describe the API of cb and cbsub.

Regards!

Please Log in to join the conversation.

12 years 9 months ago #171956 by krileon
CBSubs API is not available to the public as of yet and has no documentation, can't instruction you on this matter beyond standard database queries (query the _cbsubs_subscriptions table).

CB API documentation can be found in the free downloads section at the below link.

www.joomlapolis.com/downloads/cat_view/77-free-member-download-area

In addition to the above you can find some API examples and usages on my site from the tutorials section at the below link.

www.allmysocials.com/directory/tutorials


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 9 months ago - 12 years 9 months ago #171992 by richard_zhuzhen
Replied by richard_zhuzhen on topic Re: How to get the subscription type in code level!
Thank you again although I'm very regret to hear that. But I still hope your group will make the CBSubs API available to the cbsub members in the nearest furture. Otherwise the policy will limit the usage of cbsub to a great extent.

Please Log in to join the conversation.

12 years 9 months ago #171998 by nant

richard_zhuzhen wrote: In my project I intergrated sobi2 component with CB and CBsub. But I wish to customerize the sourcecode of sobi2 because some function has relationship with the user's subscription type. So I need to judge what kind of subscription the user log in. Can you give me the example sourcecode(PHP) about how to do this.

For example: $cbUser =& CBuser::getInstance( $_CB_framework->myId() ); //This code told me how to get the instance of CBuser, so I can get all the property of the instance like username, usergroup etc.

By the way, are there any documents to describe the API of cb and cbsub.

Regards!


You can use existing CBSubs / CB integration to set a CB field value to indicate the active subscription (can be one checkbox field per subscription). Then you can use existing CB API to check this value in a new SOBI CB plugin?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.238 seconds

Facebook Twitter LinkedIn