Expiring User Upgrades

Expiring User Upgrades [Paid] 2.6.2

No permission to buy ($25.00)

Xon

Well-known member
Xon submitted a new resource:

Expiring User Upgrades - Notify your members when their account upgrades are about to expire

About:
This add-on sends out an alert and/or email X days before a user upgrade is about to expire, with an optional second notification once the upgrade has expired.
Purchased non-recurring upgrades also get a 'Extend Upgrade' button so members can renew their upgrades without interruption.
Also, expired upgrades may be viewed as a list.

Please note that this add-on adds one column to the xf_user_upgrade_active table in order to keep track of those who have been notified.
It...

Read more about this resource...
 
Does this work with existing upgrades or only on new upgrades?

Also, I particularly like the idea that a member can extend an upgrade but how many times can they extend it?
For instance, if a member has an upgrade due to expire in two months, say for a period of 6 months, can they increase the six month upgrade several times to keep adding to the time period?
 
Does this work with existing upgrades or only on new upgrades?
This works for buying the same once-off subscription multiple times. But does not support recurring subscription.

Also, I particularly like the idea that a member can extend an upgrade but how many times can they extend it?
For instance, if a member has an upgrade due to expire in two months, say for a period of 6 months, can they increase the six month upgrade several times to keep adding to the time period?
There isn't any real limit for how long an upgrade can go for. It might get a bit wonky if they expend an upgrade past 2038 depending on if you are using 32bit php.

It does need to be the same user upgrade definition, there really isn't the concept of stacking different user upgrade definitions as the "same" thing.
 
I don't know if this is a bug but having installed this all users with renewable account upgrades have received a message and email regardless of how much time is left before expiry.....

Dave, your account upgrade named Site Support - 12 Months at M...s Forums will expire in 158 days.
Thank you for having purchased this upgrade and we hope you have enjoyed the benefits it offered.
You may extend or renew your account upgrades here.

It is set to send the reminder 7 days prior to expiry within the settings
 
Last edited:
Also, getting this error when a user extends their upgrade...

Server error log



  • ErrorException: [E_NOTICE] Undefined index: length_unit
  • src\XF\Service\User\Upgrade.php:105

  • Generated by: Unknown account
  • Jun 25, 2018 at 10:23 PM

Stack trace

#0 src\XF\Service\User\Upgrade.php(105): XF::handlePhpError(8, '[E_NOTICE] Unde...', 'C:\\inetpub\\vhos...', 105, Array)
#1 src\XF\Service\User\Upgrade.php(158): XF\Service\User\Upgrade->finalSetup()
#2 src\addons\SV\ExpiringUserUpgrades\XF\Service\User\Upgrade.php(25): XF\Service\User\Upgrade->upgrade()
#3 src\XF\Purchasable\UserUpgrade.php(149): SV\ExpiringUserUpgrades\XF\Service\User\Upgrade->upgrade()
#4 src\XF\Payment\AbstractProvider.php(164): XF\Purchasable\UserUpgrade->completePurchase(Object(XF\Payment\CallbackState))
#5 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#6 {main}


Instead of adding 12 months to the current upgrade, it is changing the status of their current upgrade to 'Permanent' - definitely not good :o
 
Last edited:
And finally, when a member extends an upgrade their forum email address is being sent to Paypal, however their Paypal address might not be the same as their forum username email address which can be confusing....

1529966894483.webp

1529967140095.webp

Is it possible to not send their username email address to Paypal but to leave the field blank for the user to fill in with their correct Paypal email address ?
 
I don't know if this is a bug but having installed this all users with renewable account upgrades have received a message and email regardless of how much time is left before expiry.....



It is set to send the reminder 7 days prior to expiry within the settings
Fixed.

Also, getting this error when a user extends their upgrade...

Server error log



  • ErrorException: [E_NOTICE] Undefined index: length_unit
  • src\XF\Service\User\Upgrade.php:105

  • Generated by: Unknown account
  • Jun 25, 2018 at 10:23 PM

Stack trace

#0 src\XF\Service\User\Upgrade.php(105): XF::handlePhpError(8, '[E_NOTICE] Unde...', 'C:\\inetpub\\vhos...', 105, Array)
#1 src\XF\Service\User\Upgrade.php(158): XF\Service\User\Upgrade->finalSetup()
#2 src\addons\SV\ExpiringUserUpgrades\XF\Service\User\Upgrade.php(25): XF\Service\User\Upgrade->upgrade()
#3 src\XF\Purchasable\UserUpgrade.php(149): SV\ExpiringUserUpgrades\XF\Service\User\Upgrade->upgrade()
#4 src\XF\Payment\AbstractProvider.php(164): XF\Purchasable\UserUpgrade->completePurchase(Object(XF\Payment\CallbackState))
#5 payment_callback.php(62): XF\Payment\AbstractProvider->completeTransaction(Object(XF\Payment\CallbackState))
#6 {main}


Instead of adding 12 months to the current upgrade, it is changing the status of their current upgrade to 'Permanent' - definitely not good :eek:
Working on fixing this, interaction with wonky XF behaviour.

And finally, when a member extends an upgrade their forum email address is being sent to Paypal, however their Paypal address might not be the same as their forum username email address which can be confusing....

View attachment 178763

View attachment 178765

Is it possible to not send their username email address to Paypal but to leave the field blank for the user to fill in with their correct Paypal email address ?
This is default XF behaviour when purchasing an upgrade, which the extend upgrade picks up.
 
Thank you for your prompt attention (y)

One more bug which I've found is when you do a search for an active user upgrade by name and enter the incorrect name, eg...

1530041915682.webp

Clicking the 'Filter' button results in the following error...


An exception occurred: [Error] Cannot use object of type XF\Mvc\Reply\Error as array in src\XF\Mvc\Router.php on line 532

XF\Mvc\Router->XF\Mvc\{closure}()
preg_replace_callback() in src/XF/Mvc/Router.php at line 565
XF\Mvc\Router->buildRouteUrl() in src/XF/Mvc/Router.php at line 461
XF\Mvc\Router->buildLinkPath() in src/XF/Mvc/Router.php at line 414
XF\Mvc\Router->buildLink() in src/XF/Mvc/Controller.php at line 745
XF\Mvc\Controller->buildLink() in src/XF/Admin/Controller/UserUpgrade.php at line 251
XF\Admin\Controller\UserUpgrade->actionActive() in src/XF/Mvc/Dispatcher.php at line 249
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1931
XF\App->run() in src/XF.php at line 328
XF::runApp() in admin.php at line 13


Not a major issue and the Beta 2 appears to have fixed the other issues
 
Back
Top Bottom