- Posts: 257
- Thank you received: 34
'Fall Back Plan'
- Calum
- Topic Author
- Offline
- Elite Member
-
Less
More
8 years 10 months ago #82244
by Calum
'Fall Back Plan' was created by Calum
AEC had a concept of a fallback plan - basically when a member expired they could drop down onto a "lower" level plan. So you might drop from Gold Premium down to Bronze Free.
I have a need to perform an expiry action 3 months after a member has expired. I was thinking of a (free) fall back plan that would be valid for 3 months and so when that one expires the task would trigger. Is there any kind of concept like this in MPro? Struggling to see anything that looks likely...
I could create a plugin to do it but is there an easy piece of code that I can call to apply someone to a new plan?
I have a need to perform an expiry action 3 months after a member has expired. I was thinking of a (free) fall back plan that would be valid for 3 months and so when that one expires the task would trigger. Is there any kind of concept like this in MPro? Struggling to see anything that looks likely...
I could create a plugin to do it but is there an easy piece of code that I can call to apply someone to a new plan?
The following user(s) said Thank You: PhoenixUK
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
8 years 10 months ago #82361
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic 'Fall Back Plan'
Sadly, there is no API like that for you to use and that's something I will have to improve in near future (provide some common API to interactive with subscriptions...)
For now, maybe you can look at plugins/plugins\user\osmembership/osmembership.php, method onUserAfterSave
There is similar code which you can copy and re-use to add a new subscription record for the user
Regards,
Tuan
For now, maybe you can look at plugins/plugins\user\osmembership/osmembership.php, method onUserAfterSave
There is similar code which you can copy and re-use to add a new subscription record for the user
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Calum
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 257
- Thank you received: 34
8 years 10 months ago - 8 years 10 months ago #82952
by Calum
Replied by Calum on topic 'Fall Back Plan': Announcing new unoffical Plugin
So as indicated above - I have created a new plugin for a FallBack Plan. For those who have come from AEC the concept is probably fairly familiar but for those who haven't let me explain. Lets assume you have a site that has Gold and Bronze Membership. Bronze is free of charge, Gold is Paid for. When a Gold member lapses rather expiring them completely you want them to drop to the Free Bronze Package. This plugin does that. Of course any time they choose they can renew their Gold again. Another use case is when their membership lapses you want to reduce their privileges for a period before completely restricting their access/. You can already send up to 3 reminders before their membership expires but this way you can send another set of reminders AFTER their membership expires. In theory you can chain together as many fall backs as you want sending even more reminders (just watched the spam police will catch up with you eventually!)
OK thats the principles of what it does.
Here's its limitations:
Its my code - not Tuan's OK actually its mostly copied from Tuan's code - but my point is its not a OS Solution plugin at the moment. If you use it don't expect Tuan to fix things when its broken. Also if you sue it its GPL and you aren't payign em for it or support so don't expect me to fix things when its broken! But do please tell me of any issues and I will try and take a look at the code! But not at Tuan's pace of development. If Tuan wants to add it to core he's welcome. If not I will probably pop it on the Joomla Extension Directory.
Only applied Free Plans It can't move someone to a paid plan. If your Gold drops to Silver and Silver is paid, you need to Copy Silver to a Silver Fall Back make it free and hide the plan from the public by putting it as only available to a user group that the publiuc can never see like SuperAdmin or creating a group.
Untested with things like Community Builder - it may work but I don't use them so not tested. I have tested it with MembPro, AcyMailing, Joomla User Profiles.
My test setup is as follows:
Paid Plan - with a defined period. Plan adds member to a Joomla Group called Member, adds to AcyMailing "Member" List and captures additional data. It works within the limitations of the Group Memberships to fall back group members too (even if the plan doesnt support groups!)' As with all group memberships upgrading / renewing from within the group membership is not possible Tuan litte request - could it explain that on the Upgrade / Renew screens for the ¨child¨ when child is logged in and clicks Renew could it say ¨As you are not the main account holder you can not renew your membership¨ rather than just no options are available. I want when a Group renews it renews the children too - can feel another plugin coming along!
When expired if not renewed - they drop to a plan called "Lapsed Membership" (You select that plan on a new tab that appears once the plugin is installed and published. Lapsed Membership lasts 2 months and is free, its only available for SuperUsers to select normally, and on use drops to a AcyMailing List called Lapsed Membership (I might send some but not all newsletters to both lists and then some newsletters to Members Only and some "Come Back Please" newsletters to Lapsed Members - perhaps I wills end a voucher code. Lapsed Members drop to Registered User Group
When that expires they are properly expired (but could drop to another plan if we wanted) and we remove them from AcyMailing and remove all but Public Joomla Access Group.
OK thats the principles of what it does.
Here's its limitations:
Its my code - not Tuan's OK actually its mostly copied from Tuan's code - but my point is its not a OS Solution plugin at the moment. If you use it don't expect Tuan to fix things when its broken. Also if you sue it its GPL and you aren't payign em for it or support so don't expect me to fix things when its broken! But do please tell me of any issues and I will try and take a look at the code! But not at Tuan's pace of development. If Tuan wants to add it to core he's welcome. If not I will probably pop it on the Joomla Extension Directory.
Only applied Free Plans It can't move someone to a paid plan. If your Gold drops to Silver and Silver is paid, you need to Copy Silver to a Silver Fall Back make it free and hide the plan from the public by putting it as only available to a user group that the publiuc can never see like SuperAdmin or creating a group.
Untested with things like Community Builder - it may work but I don't use them so not tested. I have tested it with MembPro, AcyMailing, Joomla User Profiles.
My test setup is as follows:
Paid Plan - with a defined period. Plan adds member to a Joomla Group called Member, adds to AcyMailing "Member" List and captures additional data. It works within the limitations of the Group Memberships to fall back group members too (even if the plan doesnt support groups!)' As with all group memberships upgrading / renewing from within the group membership is not possible Tuan litte request - could it explain that on the Upgrade / Renew screens for the ¨child¨ when child is logged in and clicks Renew could it say ¨As you are not the main account holder you can not renew your membership¨ rather than just no options are available. I want when a Group renews it renews the children too - can feel another plugin coming along!
When expired if not renewed - they drop to a plan called "Lapsed Membership" (You select that plan on a new tab that appears once the plugin is installed and published. Lapsed Membership lasts 2 months and is free, its only available for SuperUsers to select normally, and on use drops to a AcyMailing List called Lapsed Membership (I might send some but not all newsletters to both lists and then some newsletters to Members Only and some "Come Back Please" newsletters to Lapsed Members - perhaps I wills end a voucher code. Lapsed Members drop to Registered User Group
When that expires they are properly expired (but could drop to another plan if we wanted) and we remove them from AcyMailing and remove all but Public Joomla Access Group.
Attachments:
Last edit: 8 years 10 months ago by Calum. Reason: Typo
Please Log in or Create an account to join the conversation.
- Calum
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 257
- Thank you received: 34
8 years 10 months ago #83069
by Calum
Replied by Calum on topic 'Fall Back Plan'
I've put this as a public project on my BitBucket site. If Tuan wants it in core thats fine - he can either fork it there or I will drop the BitBucket page.
To make sure you are using teh most up to date version visit:
bitbucket.org/shinysolutions/fallback
Direct download:
bitbucket.org/shinysolutions/fallback/get/83d319d9c1df.zip
To report any issues:
bitbucket.org/shinysolutions/fallback/is...atus=new&status=open
To make sure you are using teh most up to date version visit:
bitbucket.org/shinysolutions/fallback
Direct download:
bitbucket.org/shinysolutions/fallback/get/83d319d9c1df.zip
To report any issues:
bitbucket.org/shinysolutions/fallback/is...atus=new&status=open
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
8 years 10 months ago #83095
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic 'Fall Back Plan'
Thanks @Calum for sharing. I don't have time to look at it now (just come back from few days holiday) and have to clear the support queue first, then I will look at it later
If I see that it is useful, I will fork it and maintain it into Membership Pro package
Thanks again for your help
Regards,
Tuan
If I see that it is useful, I will fork it and maintain it into Membership Pro package
Thanks again for your help
Regards,
Tuan
The following user(s) said Thank You: PhoenixUK
Please Log in or Create an account to join the conversation.
- Calum
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 257
- Thank you received: 34
8 years 10 months ago #83101
by Calum
Replied by Calum on topic 'Fall Back Plan'
No problem.
Hope you had a good holiday.
Hope you had a good holiday.
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.