Automatic extension into next year based on days
- intouchweb
- Topic Author
- Offline
- Elite Member
-
Less
More
9 years 3 months ago - 9 years 3 months ago #73647
by intouchweb
Automatic extension into next year based on days was created by intouchweb
MEMBERSHIP PRO FEATURE REQUEST - We have membership plans working on each calendar year. This has the unfortunate consequence that if someone joins late in the year they only get a small period of time before the plan expires. Is there any way we can add a setting so that if a new subscription comes in within a specific number of days of the expiry, it automatically gives them a renewal for the next year?
For example if a customer buys a subscription in the 2016 plan after 1st September 2016 I would like them to automatically receive the rest of the year as a bonus, ie their subscription would include the full 2017 calendar year.
If this can be done now somehow please let me know, otherwise please regard it as a feature request on a future update.
Would anyone else benefit from this feature?
Thanks
For example if a customer buys a subscription in the 2016 plan after 1st September 2016 I would like them to automatically receive the rest of the year as a bonus, ie their subscription would include the full 2017 calendar year.
If this can be done now somehow please let me know, otherwise please regard it as a feature request on a future update.
Would anyone else benefit from this feature?
Thanks
Last edit: 9 years 3 months ago by intouchweb.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 3 months ago #73649
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Automatic extension into next year based on days
At the moment, we don't have any option like that. There is a workaround, for example, if your subscription end date is 31 December 2015 and you want that any subscribers sign up from 20 December 2015 will be expired in 2016, then on 20 December, you can edit the plan, change the fixed expiration date to 30 December 2016
That should work well without requiring other code modification
Tuan
That should work well without requiring other code modification
Tuan
Please Log in or Create an account to join the conversation.
- intouchweb
- Topic Author
- Offline
- Elite Member
-
9 years 3 months ago - 9 years 3 months ago #73679
by intouchweb
Replied by intouchweb on topic Automatic extension into next year based on days
That sounds like a great workaround. However, if I change the end date of a plan to the following year, wouldn't that also update the existing members who have not yet renewed and were due to expire on 31 December 2015, ie give them a free year extension, or would this change only take effect to new subscribers?
Last edit: 9 years 3 months ago by intouchweb.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 3 months ago #73680
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Automatic extension into next year based on days
No, it will only affect new subscribers who sign up after the time you made the change
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- Margaret Hunter
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
9 years 3 months ago #73713
by Margaret Hunter
Replied by Margaret Hunter on topic Automatic extension into next year based on days
Just to say I'd like this feature too! I want to offer carry-over to next year for people who sign up in the 3 months prior to my fixed date expiry.
Please Log in or Create an account to join the conversation.
- Alan Bennett
- Offline
- Elite Member
-
Less
More
- Posts: 188
- Thank you received: 28
9 years 1 month ago #77699
by Alan Bennett
Replied by Alan Bennett on topic Automatic extension into next year based on days
Hi
I have a better solution for this that I have implemented using th php plugin on a plan. It kicks in for new joiners only. I added the following code in the Subscription Stored Script:
//Extend TO_DATE if month of FROM_DATE is in April, May, June
$db = JFactory::getDbo();
$sql = 'UPDATE #__osmembership_subscribers set to_date = DATE_ADD(to_date, INTERVAL 1 YEAR) WHERE MONTH(from_date) IN (4,5,6) AND id=' . $row->id;
$db->setQuery($sql);
$db->query();
In my cast the subscription expires on the 30 June.
in your case for an expiry on the 31st December you would need:
//Extend TO_DATE if month of FROM_DATE is in Oct, Nov, Dec
$db = JFactory::getDbo();
$sql = 'UPDATE #__osmembership_subscribers set to_date = DATE_ADD(to_date, INTERVAL 1 YEAR) WHERE MONTH(from_date) IN (10,11,12) AND id=' . $row->id;
$db->setQuery($sql);
$db->query();
I have a better solution for this that I have implemented using th php plugin on a plan. It kicks in for new joiners only. I added the following code in the Subscription Stored Script:
//Extend TO_DATE if month of FROM_DATE is in April, May, June
$db = JFactory::getDbo();
$sql = 'UPDATE #__osmembership_subscribers set to_date = DATE_ADD(to_date, INTERVAL 1 YEAR) WHERE MONTH(from_date) IN (4,5,6) AND id=' . $row->id;
$db->setQuery($sql);
$db->query();
In my cast the subscription expires on the 30 June.
in your case for an expiry on the 31st December you would need:
//Extend TO_DATE if month of FROM_DATE is in Oct, Nov, Dec
$db = JFactory::getDbo();
$sql = 'UPDATE #__osmembership_subscribers set to_date = DATE_ADD(to_date, INTERVAL 1 YEAR) WHERE MONTH(from_date) IN (10,11,12) AND id=' . $row->id;
$db->setQuery($sql);
$db->query();
The following user(s) said Thank You: Tuan Pham Ngoc
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
9 years 1 month ago #77767
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Automatic extension into next year based on days
I think I can implement it into the core download package as well. However, if we add a config option to allow admin to choose number of days like this, how should we call that config option (the name/title of the config option). Do you have any idea ? Want to have simple, easy to understand text so that customers can easy understand the purpose of this config option
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- intouchweb
- Topic Author
- Offline
- Elite Member
-
9 years 1 month ago - 9 years 1 month ago #77772
by intouchweb
Replied by intouchweb on topic Automatic extension into next year based on days
Hi Tuan, I would suggest something like "New Member Bonus Period" or just "Bonus Period" might explain it well, perhaps with a tool tip if possible that says "Number of days prior to a fixed plan expiry where new members also receive the following subscription period as a bonus".
The default could be set to zero unless set otherwise - that would be great!
Also worth considering at the same time is the related request to add the option of a grace period AFTER expiry dates where current members are allowed to renew their subscription for a pre-defined number of days AFTER the plan expiry without losing their continuous membership history. It seems very harsh to not allow a grace period for a short period after expiry. In this case I would suggest another field would be great called something like "Renewal Grace Period" ,again with a default of zero days, where the renewal grace period can be set by the admin.
hope this helps, Thanks !
The default could be set to zero unless set otherwise - that would be great!
Also worth considering at the same time is the related request to add the option of a grace period AFTER expiry dates where current members are allowed to renew their subscription for a pre-defined number of days AFTER the plan expiry without losing their continuous membership history. It seems very harsh to not allow a grace period for a short period after expiry. In this case I would suggest another field would be great called something like "Renewal Grace Period" ,again with a default of zero days, where the renewal grace period can be set by the admin.
hope this helps, Thanks !
Last edit: 9 years 1 month ago by intouchweb.
Please Log in or Create an account to join the conversation.
- intouchweb
- Topic Author
- Offline
- Elite Member
-
9 years 1 month ago #77778
by intouchweb
Replied by intouchweb on topic Automatic extension into next year based on days
Sorry just one more thing, when I refer to 'new member' here I am also referring to previous members who have let their membership lapse (past any grace period), so that these expired members can also be enticed back during the bonus membership period. Thanks again!
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.