PDA

View Full Version : Need Help with VB Subscription EXTENSIONS!!


cleaningh89ss
09-20-2012, 01:22 AM
Hey everyone,

Please tell me someone knows how to hand out subscription extensions....... our code sometimes needs to be updated and we want to give 2 - 5 day extensions on the users sub. Anyway of doing that? I did see the code below on another site. Not sure if it's accurate or not. Any help would be awesome!

This query should work to add time to current active subscriptions (backup first):

Code:
UPDATE subscriptionlog
SET expirydate = expirydate + (86400 * 3)
WHERE status = 1
This will add 3 days to all active subscriptions (not expired). I haven't tested this over the full course of a subscription, but it should work.

If their subscription expired over that 3 days then you can't just run a query because there are group changes that will need to be made. You will have to use the Subscription Manager to manually reactivate and extend those recently expired subscriptions.






You can run queries in your:

Admin CP -> Maintenance -> Execute SQL Query

You must have permission to execute queries in your includes/config.php file:

Code:
// ****** USERS WITH QUERY RUNNING PERMISSIONS ******
// The users specified here will be allowed to run queries from the control panel.
// See the above entries for more information on the format.
// Please note that the ability to run queries is quite powerful. You may wish
// to remove all user IDs from this list for security reasons.
$config['SpecialUsers']['canrunqueries'] = '';

kh99
09-20-2012, 11:48 AM
I haven't tried that myself but I think that's where the expiration date is stored so it seems like that should work. But of course that extends every (active) paid subscription in your system. If you only want to hand out an extension for one or a few users you can do that through the Paid Subscription manager.

cleaningh89ss
09-20-2012, 06:16 PM
I haven't tried that myself but I think that's where the expiration date is stored so it seems like that should work. But of course that extends every (active) paid subscription in your system. If you only want to hand out an extension for one or a few users you can do that through the Paid Subscription manager.

usually it's everyone in the one sub category. So out of 9 different subs we have, only one with 300 members may need to be extended

kh99
09-20-2012, 08:46 PM
Then I guess you'd want to add "AND subscriptionid = X" to the WHERE part of the query, and change X to the subscriptionid you want to extend.