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'] = '';
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'] = '';