openmind Posted May 21, 2012 Share Posted May 21, 2012 OK I have the licensing module working well and plan to charge a recurring annual fee for customers using our software however I also provide free hosting for the customers using the license. Now I guess the easiest way to do this would be to create a hosting order after the license order has been placed and just set it as free but I'm not entirely sure how to do this. I guess using a hook would be the best way but does anyone have any example of doing this? 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 21, 2012 Share Posted May 21, 2012 I've run a few promotions like this. I just have it include a hosting package that's set as needing manual setup, and then go and activate it on a Free billing cycle. This stops fraudulent signups from getting free hosting. As to the implementation, hooks is the way to go really, if you don't want the hosting package as part of the product 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted May 21, 2012 Share Posted May 21, 2012 You could use product bundles for this When a license is ordered the bundled hosting would be auto setup. 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted May 21, 2012 Author Share Posted May 21, 2012 You could use product bundles for this When a license is ordered the bundled hosting would be auto setup. Genius Totally forgot about that feature... 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 21, 2012 Share Posted May 21, 2012 The "catch" with a bundle is that a fraudulent signup could use this to get free hosting until you deactivate it, unless you have a fraud prevention module to stamp out that kind of thing. 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted May 21, 2012 Author Share Posted May 21, 2012 I've run a few promotions like this. I just have it include a hosting package that's set as needing manual setup, and then go and activate it on a Free billing cycle. This stops fraudulent signups from getting free hosting. As to the implementation, hooks is the way to go really, if you don't want the hosting package as part of the product I'm trying to automate this as far as as possible mainly as the licenses will only work on our servers and the product attracts very little fraud... 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted May 21, 2012 Author Share Posted May 21, 2012 The "catch" with a bundle is that a fraudulent signup could use this to get free hosting until you deactivate it, unless you have a fraud prevention module to stamp out that kind of thing. Fair point but if this were to happen then it would be caught in 24 hours or less.... 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted May 21, 2012 Share Posted May 21, 2012 maxmind comes free with whmcs 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 21, 2012 Share Posted May 21, 2012 Not free per se, up to 1000 checks/mo. Mind you, from the sounds of it you won't be doing such a volume as to exceed that. 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted May 21, 2012 Author Share Posted May 21, 2012 Yeh we already use MaxMind to great effect. To be honest though fraud is a non-issue with the license side of the business as the product doesn't attract it and we get very few orders that haven't had at least one pre-sales question. It's an ecommerce software package you see... One other thing that springs to mind though. After the sale is made it would be handy to have the order details posted to our own systems for post-sale install tasks. This would involve a hook but we would only need the whmcs ID to pick it up from there. Not done one of these before so any guidance? Thanks for the responses so far Edit: If we were doing 1000/mo on these plans I would die a happy man 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 21, 2012 Share Posted May 21, 2012 I'm not sure I entirely understand what you're trying to do that WHMCS doesn't already do ... unless you mean you have another system you want WHMCS to send information to? 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted May 21, 2012 Author Share Posted May 21, 2012 Yup that's it exactly, I just need to post the order details to our own internal page so something like this: <?php function complete_installation($vars) { #Post all the vars } add_hook("ShoppingCartCheckoutCompletePage",1,"complete_installation"); ?> As I'm not a PHP programmer, I use ColdFusion, the bit I'm unsure of is how to post all the vars to my own page... 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted May 21, 2012 Author Share Posted May 21, 2012 Actually would this work to post the orderid to my page? <?php $url = 'http://mydomain.com/install.cfm'; function complete_installation($vars) { $fields = array( 'orderid'=>$vars['orderid'] ); //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST,count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string); //execute post $result = curl_exec($ch); //close connection curl_close($ch); } add_hook("ShoppingCartCheckoutCompletePage",1,"complete_installation"); ?> 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 21, 2012 Share Posted May 21, 2012 Looks good to me, only one way to find out for sure though. I couldn't comment on compatability with your own systems. (Also an aside: I haven't heard of someone using CF in ages, nice!) 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted May 21, 2012 Author Share Posted May 21, 2012 Well I can grab post vars from CF quite easily and access the whmcs DB referencing that orderid so I'm just going to have give it a blast... Ref CF - I've been developing with it since 1998, fantastic language to work with 0 Quote Link to comment Share on other sites More sharing options...
Peter M Dodge Posted May 21, 2012 Share Posted May 21, 2012 (edited) CF is one of those languages on my perpetual "I should learn this someday" list. Let me know if you have problems you can't figure out re: the PHP, I've been using PHP for ... about as long as you have been using CF actually Edited May 21, 2012 by Peter M Dodge 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted May 21, 2012 Author Share Posted May 21, 2012 I appreciate that.. 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.