gaogier Posted February 16, 2010 Share Posted February 16, 2010 Hello Is there an addon for this, not sure the addon i downloaded would work. I need a whmcs 90 day trial. The plan. Users join, use our promotion key and get 90 days worth of hosting free. This would be a trial hosting account, they can leave before its up. If they don't I want them to have a bill sent to them. Is there something like this already around? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted February 17, 2010 WHMCS Support Manager Share Posted February 17, 2010 A free trial mod is available at http://whmcs.com/members/communityaddons.php however the official addon will simply terminate the account after the trial period. 0 Quote Link to comment Share on other sites More sharing options...
gaogier Posted February 19, 2010 Author Share Posted February 19, 2010 So, there is not one possible? 0 Quote Link to comment Share on other sites More sharing options...
oceanx Posted February 24, 2010 Share Posted February 24, 2010 I was looking for the same thing, but instead of terminating the account charge the customer's credit card. Is it very complicated to modify the current addon to do this? 0 Quote Link to comment Share on other sites More sharing options...
thunderesl Posted February 26, 2010 Share Posted February 26, 2010 Hi guys, I want to use the Official Free Trials mod but instead of terminating the trial account after it expires i would like to suspend the account. Then if the customer just forgets to upgrade i still have their account on the server if they come bak so i can just unsuspend them and save time. I think it should be fairly simple to change the command from terminate to suspend in the action hooks code but im not a coder and dont really have the first idea where to look to do this. Could someone please tell me how to do this. Thanks in advance 0 Quote Link to comment Share on other sites More sharing options...
Juanzo Posted March 3, 2010 Share Posted March 3, 2010 If the upgrade reminder email is sent once the account trial has finished, the account is terminated so I find the official trials mod, as it is right now, a little bit useless. It would be nice to send an email X days prior the end of the trial so that the client has enough time to decide either they want to pay for the account or leave. 0 Quote Link to comment Share on other sites More sharing options...
Juanzo Posted March 3, 2010 Share Posted March 3, 2010 Just in case someone is interested, I've modified the original code to send the email X days after the signup, and Y days after the signup to terminate the account (IMHO, just the way it should work). If anyone wants to test it, here it is: <?php function end_free_trials_hook($args) { if (!function_exists("ModuleBuildParams")) require(ROOTDIR."/includes/modulefunctions.php"); # Duplicate the free trials array for each trial product you want to offer entering the # product id, how many days to allow and email template to send when the trial period ends $freetrials[] = array( "pid" => "1", "days" => "15", "days_email" => "10", "email_subject" => "Aviso Hosting Prueba", ); # Do not edit below this line foreach ($freetrials AS $data) { $pid = $data["pid"]; $days = $data["days"]; $email_subject = $data["email_subject"]; $trialexpiry = date("Y-m-d",mktime(0,0,0,date("m"),date("d")-$days,date("Y"))); $emailexpiry = date("Y-m-d",mktime(0,0,0,date("m"),date("d")-$days_email,date("Y"))); $query = "SELECT tblhosting.id,tblproducts.servertype FROM tblhosting INNER JOIN tblproducts ON tblproducts.id=tblhosting.packageid WHERE packageid=".(int)$pid." AND domainstatus='Active' AND regdate<'$emailexpiry'"; $result = full_query($query); while($data = mysql_fetch_array($result)) { $id = $data["id"]; $module = $data["servertype"]; if (!function_exists($module."_ConfigOptions")) require_once(ROOTDIR."/modules/servers/$module/$module.php"); sendMessage($email_subject,$id); } $query = "SELECT tblhosting.id,tblproducts.servertype FROM tblhosting INNER JOIN tblproducts ON tblproducts.id=tblhosting.packageid WHERE packageid=".(int)$pid." AND domainstatus='Active' AND regdate<'$trialexpiry'"; $result = full_query($query); while($data = mysql_fetch_array($result)) { $id = $data["id"]; $module = $data["servertype"]; if (!function_exists($module."_ConfigOptions")) require_once(ROOTDIR."/modules/servers/$module/$module.php"); ServerTerminateAccount($id); } } } add_hook("DailyCronJob",1,"end_free_trials_hook",""); ?> 0 Quote Link to comment Share on other sites More sharing options...
thunderesl Posted March 3, 2010 Share Posted March 3, 2010 Is there anyway to make it Suspend the account instead of terminating it? 0 Quote Link to comment Share on other sites More sharing options...
jcorbett Posted March 4, 2010 Share Posted March 4, 2010 This would really be helpful. I did a vanilla install and it terminated certain accounts I had setup for free. Thank G-d the cron job ran only after I had my nightly backups. 0 Quote Link to comment Share on other sites More sharing options...
ExsysHost Posted March 4, 2010 Share Posted March 4, 2010 I created a complete free trials mod that handles multiple notices as well as suspension before termination in order to give the customer more time to realize their free trial was over before we deleted their files from the server. http://forum.whmcs.com/showthread.php?p=142436 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.