[SOLVED] Each member gets access to new content monthly

12 years 10 months ago - 12 years 9 months ago #163752 by sorozco
Hello.
We need the following use case. Please let me know if it is implemented on CBSubs:

1. An user subscribes on monthly recurrent payments
2. Every time a new payment is charged monthly the user can access to a new section.
Example:
If One user has been charged one monthly payment has access to section 1
If another user has been charged three monthly payments, he has access to section 1, 2 and 3.
If another one has been charged for 10 months, he can access section 1 to 10.
If one user pays anual payments, he has access to 12 sections, and in the next anual payment he would access 13 to 24 section.

Is that possible automatically by CBSubs?

Regards

Please Log in to join the conversation.

12 years 10 months ago #164041 by krileon

Is that possible automatically by CBSubs?

No, CBSubs does not have time access as you're wanting. You'd need multiple plans and the user would need to upgrade to a new plan each month to gain access to a new section for instance. Best approach is to charge a single subscription then set Publish Up dates on your sections, categories, or articles within Joomla so the content won't actually be available until the date you've specified.


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 10 months ago #164066 by sorozco

krileon wrote:

...set Publish Up dates on your sections, categories, or articles within Joomla so the content won't actually be available until the date you've specified.


Thank you Krileon.

I think that the problem doesn't get solved in that way. Subscribers should have access to each section in totally different dates and hours, depending on the suscription date. When one person gets the right to access the second section, maybe there are another 10 that should have access to 5 sections. So, I imagine that the publishing of some content appears to all the subcribers at the same time.

Do you know any plugin that could help?

Please Log in to join the conversation.

12 years 10 months ago - 12 years 10 months ago #164791 by krileon
The only other approach is to use incubator project CB Content Bot and CB Query Field. You'd first create a query field to query _cbsubs_subscriptions and obtain the users active subscription date of a specific plan id. In that same query you should perform your calculations. For example compare the difference in days to NOW() using SQL functions. Example query as follows.
SELECT DATEDIFF( NOW(), `subscription_date` )  FROM `#__cbsubs_subscriptions` WHERE `user_id` = [user_id] AND `status` = 'A' AND `plan_id` = PLAN_ID_HERE

With the above simply replace PLAN_ID_HERE with the actual ID of your plan. This would calculated for you based off the user_id and if plan is active their subscription duration in days compared to the current time. So if they're subscribed for 10 days that field would return "10".

This would result in for example the field cb_mysubdiff returning 30 days, meaning their subscription has been active for 30 days. Now you'd use IF substitutions in your Joomla articles checking if cb_mysubdiff>"30" (CB Content Bot allows substitution usage in Jooml articles).

This means if they've been subscribed for 30 days or more then show XYZ. This will not however function for categories or sections and does require some manual work, but will give you timed display of content based off individual subscription times.


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 10 months ago #164811 by sorozco
Thank you very much Krileon. That sounds like a good alternative. The only problem is that we are new to joomla and CB, so we will have to learn how to do program it, but at least we now know that there is some way to solve our requirement.

Regards,

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.240 seconds

Facebook Twitter LinkedIn