Show / activate plans during a defined period
- giecie
- OFFLINE
- Posts: 63
- Thanks: 1
- Karma: 0
13 years 3 months ago #151911
by giecie
Show / activate plans during a defined period was created by giecie
I'm looking for the following set-up in CBSubs;
New member subscription plans;
Plan 1 = JANUARY = €175 (price 1 year)
Plan 2 = FEBRUARY = €160,42 (11/12 of 1 year)
Plan 3 = MARCH = €145,83 (10/12 of 1 year)
......
Plan 9 = SEPTEMBER = €58,33 (4/12 of 1 year)
Plan 10 = OCTOBER = €218,75 (1 year + 3/12 of 1 year)
Plan 11 = NOVEMBER = €204,17 (1 year + 2/12 of 1 year)
Plan 12 = DECEMBER = €189,58 (1 year + 1/12 of 1 year)
Update member subscription plan;
Plan 13 = upgrade for 1 year, only for members.
I can create all these plans and manual publish them per month via de back-end.
But is there an 'automatic' way to manage/configure the publication of these plans or is there maybe another implementation way?
Thanks.
Geert
New member subscription plans;
Plan 1 = JANUARY = €175 (price 1 year)
Plan 2 = FEBRUARY = €160,42 (11/12 of 1 year)
Plan 3 = MARCH = €145,83 (10/12 of 1 year)
......
Plan 9 = SEPTEMBER = €58,33 (4/12 of 1 year)
Plan 10 = OCTOBER = €218,75 (1 year + 3/12 of 1 year)
Plan 11 = NOVEMBER = €204,17 (1 year + 2/12 of 1 year)
Plan 12 = DECEMBER = €189,58 (1 year + 1/12 of 1 year)
Update member subscription plan;
Plan 13 = upgrade for 1 year, only for members.
I can create all these plans and manual publish them per month via de back-end.
But is there an 'automatic' way to manage/configure the publication of these plans or is there maybe another implementation way?
Thanks.
Geert
Please Log in or Create an account to join the conversation.
- krileon
- ONLINE
- Posts: 68606
- Thanks: 9108
- Karma: 1434
13 years 3 months ago #151942
by krileon
Enable:
Disable:
Simply replace PLAN_ID with the plan in question and MONTH_INTEGER with the month you want that plan to enable/disable.
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.
Replied by krileon on topic Re: Show / activate plans during a defined period
Sure, you could use a cronjob for instance to publish. Better to simple enable/disable new registrations as users who paid and you simply unpublish would lose their paid access. You could also use professional subscriber incubator project CB Queries to perform a database query at various CB triggers to check the date and enable Plan XYZ based on that date as well. Example query as follows.But is there an 'automatic' way to manage/configure the publication of these plans or is there maybe another implementation way?
Enable:
Code:
UPDATE `#__cbsubs_plans` SET `allow_newsubscriptions` = 1 WHERE `id` = PLAN_ID AND `allow_newsubscriptions` = 0 AND MONTH( NOW() ) = MONTH_INTEGER
Disable:
Code:
UPDATE `#__cbsubs_plans` SET `allow_newsubscriptions` = 0 WHERE `id` = PLAN_ID AND `allow_newsubscriptions` = 1 AND MONTH( NOW() ) = MONTH_INTEGER
Simply replace PLAN_ID with the plan in question and MONTH_INTEGER with the month you want that plan to enable/disable.
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 or Create an account to join the conversation.
- giecie
- OFFLINE
- Posts: 63
- Thanks: 1
- Karma: 0
13 years 3 months ago #151956
by giecie
Replied by giecie on topic Re: Show / activate plans during a defined period
Thanks for your answer.
Do you have also an example of the cronjob syntax I can use?
Rgds,
Geert
Do you have also an example of the cronjob syntax I can use?
Rgds,
Geert
Please Log in or Create an account to join the conversation.
- krileon
- ONLINE
- Posts: 68606
- Thanks: 9108
- Karma: 1434
13 years 3 months ago #151966
by krileon
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.
Replied by krileon on topic Re: Show / activate plans during a defined period
Sorry, no I don't. I've never written cron scripts, but simply just know it's possible.Do you have also an example of the cronjob syntax I can use?
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 or Create an account to join the conversation.
Moderators: beat, nant, krileon