visualtron Posted March 26, 2010 Share Posted March 26, 2010 - I have an api file and a modified actionhooks.php file that will connect to the db and grab the license file, then apply the license file to the client's account. Thanks for sharing your module. I've tried it after realizing that the Licensing Addon Module won't meet my requirement since it is only for PHP or bwe application. Could you also please share the remainder of your code? Also, do you think it is possible to display the registration key under Portal Home > Client Area > My Products & Services? 0 Quote Link to comment Share on other sites More sharing options...
RPS Posted March 26, 2010 Author Share Posted March 26, 2010 Can I ask as to where i put this code as i'm lossed? Any help would be welcomed David - Start with the first post here, follow the directions, and when you are not sure of a specific step, please list it. This was created for an older version of WHMCS, so I'm not sure if it still works the same way or not. But i had to change the following for it to work. require('../../../../configuration.php'); to require('../../../configuration.php'); - Thanks for pointing that out, something may have changed with the new version of WHMCS, causing this change. If others can confirm this, then I'll update my 1st post. Thanks for sharing your module. I've tried it after realizing that the Licensing Addon Module won't meet my requirement since it is only for PHP or bwe application. Could you also please share the remainder of your code? Also, do you think it is possible to display the registration key under Portal Home > Client Area > My Products & Services? - The 1st part of the code is in the 1st post, this is just a backend area to handle the administration side of things. The 2nd part, is in the 8th post: http://forum.whmcs.com/showpost.php?p=49196&postcount=8 This is the actionhooks part that actually adds the license key to the order process, sends out the correct e-mails, etc.. I haven't updated it to work with the newer versions of WHMCS, so I'm not sure if it still works or not. 0 Quote Link to comment Share on other sites More sharing options...
scouthostinguk Posted March 27, 2010 Share Posted March 27, 2010 I've done as said and have put the code below into the ACTIONHOOKS.php file with no luck so I don't know i've done it right or wrong? // location for WHMCS configuration file require('../../configuration.php'); $key = $_GET['key']; $company = $_GET['company']; $product = $_GET['product']; $type = $_GET['type']; // http://www.your-domain.com/order.php?key=00000&company=AVG&product=AntiVirus&type=OEM if($key == "0000") { mysql_connect($db_host, $db_username, $db_password) or die(mysql_error()); mysql_select_db($db_name) or die(mysql_error()); # Let's grab the ID and License Key for the first license that is available $result = mysql_query("SELECT `id`,`key` FROM mod_license_keys WHERE avail='1' AND company='".$company."' AND product='".$product."' AND type='".$type."' LIMIT 1"); $grab_fieldname = mysql_fetch_row($result); $id = $grab_fieldname[0]; $licensekey = $grab_fieldname[1]; // License is sold out, send error message if(!$licensekey){ echo "SOLD OUT";} else{ // output the id (location) and serial number echo "SUCCESS,".$id.",".$licensekey;} // set serial number to be no longer available mysql_query("UPDATE mod_license_keys SET avail='0' WHERE id='".$id."'"); } 0 Quote Link to comment Share on other sites More sharing options...
visualtron Posted March 28, 2010 Share Posted March 28, 2010 This is the actionhooks part that actually adds the license key to the order process, sends out the correct e-mails, etc.. I haven't updated it to work with the newer versions of WHMCS, so I'm not sure if it still works or not. Thanks for the pointer, btw, your pm box is full. Would you also share which hook point are you using? http://wiki.whmcs.com/Action_Hooks My requirement is a little tricky because some users (big corporations) are on net 30 and require the license key on order, while others should get it only after payment. Also, do you intend to show the license key when the user login to view the service/product? I've done as said and have put the code below into the ACTIONHOOKS.php file with no luck so I don't know i've done it right or wrong? Is there an actionhooks.php? It says here that to create an action hook we need to declare a function that performs the action we want to run, and then add the hook to WHMCS by calling the add_hook function, e.g. function create_forum_account($vars) { print_r($vars); } add_hook("ClientAdd",1,"create_forum_account"); http://wiki.whmcs.com/Action_Hooks 0 Quote Link to comment Share on other sites More sharing options...
visualtron Posted March 28, 2010 Share Posted March 28, 2010 (edited) My requirement is a little tricky because some users (big corporations) are on net 30 and require the license key on order, while others should get it only after payment. So ideally, I should use a hook that runs only after the order has been accepted by me. Edited March 28, 2010 by clickndeploy 0 Quote Link to comment Share on other sites More sharing options...
mattster Posted April 6, 2010 Share Posted April 6, 2010 Hey, I really need some help with the ordering bit, can you drop me a email with some basic help. My email is m.p@mrhostuk.com Thanks, greatly appreciated. 0 Quote Link to comment Share on other sites More sharing options...
dansgalaxy Posted April 7, 2010 Share Posted April 7, 2010 Is there a packaged version with all the files? 0 Quote Link to comment Share on other sites More sharing options...
Business Hosting Online Posted April 9, 2010 Share Posted April 9, 2010 A complete zipped package here would be very useful. 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted April 9, 2010 Share Posted April 9, 2010 wow this addon/thread is like watching a thriller chiller !! Can't wait for the ending.... 0 Quote Link to comment Share on other sites More sharing options...
mattster Posted April 10, 2010 Share Posted April 10, 2010 Im working on one, just need to get the makers permssion. I have also added another option to it. You will be able to assign a license to a User, and you will be able to delete the licenses. But that is whats coming up. Im also working on a "server" module for it, so that you can sell them from the database, and get that automatically assigned to a user. List of New Features Assign License to User Delete Licenses Sell licenses and assign them to customers Add License types (Monthly, Yearly, Owned, + You can add your own) Username Field (Needed to assign to a user) Notifies Admin to suspend license when customer hasnt paid (Email) So thats it so far, any more suggestions feel free to say so. I will post an Image soon of what it looks like now. 0 Quote Link to comment Share on other sites More sharing options...
mattster Posted April 10, 2010 Share Posted April 10, 2010 Ok, I have been working on and Improving It, I will release if I get the authors permission. Here is some new features that I have added - Username Field - New license types (Monthly, Yearly, Owned) - Notify admin to via email to suspend their license at Script Providers (When their license is set un-paid) - Added to the admin menu Features to be added - "Server" Module (So you can sell the licenses and assign it to a user automatically) - Change + Add Licnense types in Script (not PHP changes, or Manual MySQL) - Edit License + Delete License If anyone wants to help me, send me a PM, and If you have any suggestions, send me a PM. 0 Quote Link to comment Share on other sites More sharing options...
mattster Posted April 10, 2010 Share Posted April 10, 2010 (edited) Here is a pic of some changes that I have made. Edited April 10, 2010 by mattster 0 Quote Link to comment Share on other sites More sharing options...
dansgalaxy Posted April 13, 2010 Share Posted April 13, 2010 Looks good! Please please PLEASE release this! 0 Quote Link to comment Share on other sites More sharing options...
mattster Posted April 14, 2010 Share Posted April 14, 2010 I need to get permission first. 0 Quote Link to comment Share on other sites More sharing options...
Damainman Posted April 19, 2010 Share Posted April 19, 2010 This is a long post so I apologize if this has already been mentioned.. But what is the difference between this add-on and the following whmcs add-on: - http://www.whmcs.com/licensingaddon.php Thank you. 0 Quote Link to comment Share on other sites More sharing options...
Sven H Posted April 20, 2010 Share Posted April 20, 2010 This is a long post so I apologize if this has already been mentioned.. But what is the difference between this add-on and the following whmcs add-on: - http://www.whmcs.com/licensingaddon.php Thank you. Hi all, any response to this question? 0 Quote Link to comment Share on other sites More sharing options...
Sodak1d Posted May 3, 2010 Share Posted May 3, 2010 Has anyone tried WHMCS' Licensing add-on? http://whmcs.com/licensingaddon.php 0 Quote Link to comment Share on other sites More sharing options...
visualtron Posted May 5, 2010 Share Posted May 5, 2010 Ok, I have been working on and Improving It, I will release if I get the authors permission. Here is some new features that I have added - Username Field - New license types (Monthly, Yearly, Owned) - Notify admin to via email to suspend their license at Script Providers (When their license is set un-paid) - Added to the admin menu Features to be added - "Server" Module (So you can sell the licenses and assign it to a user automatically) - Change + Add Licnense types in Script (not PHP changes, or Manual MySQL) - Edit License + Delete License If anyone wants to help me, send me a PM, and If you have any suggestions, send me a PM. interesting, have you considered on how to let the user view their assigned license online? 0 Quote Link to comment Share on other sites More sharing options...
mattster Posted May 9, 2010 Share Posted May 9, 2010 interesting, have you considered on how to let the user view their assigned license online? Yes, that is what I mean by "Server" module It seems to be working well for me 0 Quote Link to comment Share on other sites More sharing options...
Damainman Posted May 12, 2010 Share Posted May 12, 2010 Hi all, any response to this question? Nope none at all... Has anyone tried WHMCS' Licensing add-on? http://whmcs.com/licensingaddon.php Yes, seems pretty simple to use but I haven't implemented it in any of my scripts yet... still trying to figure out what functionality should go in the file you need to encrypt. 0 Quote Link to comment Share on other sites More sharing options...
50mb Posted May 27, 2010 Share Posted May 27, 2010 Has anyone tried WHMCS' Licensing add-on? http://whmcs.com/licensingaddon.php Yes it pretty much sucks, support lacks and not enough info to help make it work, I have to say I am not a master head php coder but know enough to get around, and with backup php coding support it is far from the best option. Lacks the info to properly integrate into a file and suspend and expire etc, in other words if you suspend the license the script you made still works but the debugger shows it suspended and only shows suspended without the localkey inserted does that make since? Not by far so I would not recommend this to a beginner unless you have phat pockets. 0 Quote Link to comment Share on other sites More sharing options...
Damainman Posted June 2, 2010 Share Posted June 2, 2010 Yes it pretty much sucks, support lacks and not enough info to help make it work, I have to say I am not a master head php coder but know enough to get around, and with backup php coding support it is far from the best option. Lacks the info to properly integrate into a file and suspend and expire etc, in other words if you suspend the license the script you made still works but the debugger shows it suspended and only shows suspended without the localkey inserted does that make since? Not by far so I would not recommend this to a beginner unless you have phat pockets. Have you tried suggesting any of the features you think is lacking to WHMCS? I ask because I'm curious if this module is done with development or whether they continue to make it better. 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted September 2, 2010 Share Posted September 2, 2010 I need to get permission first. Any updates? I would think you could do your mod as long as you ref back to the op's site/this thread like: put this in the footer of the admin and top of each changed file: 1, Portions Copyright © "date of op's last post here" op's name and link to this thread. 2, "the name of your mod" is derived from: Copyright © "date of op's last post here" op's name and link to this thread 0 Quote Link to comment Share on other sites More sharing options...
RPS Posted September 2, 2010 Author Share Posted September 2, 2010 Feel free to post the code here, or start a new thread if you prefer, and I can update this one to point over to the new thread too. 0 Quote Link to comment Share on other sites More sharing options...
CatsEye Posted September 6, 2010 Share Posted September 6, 2010 This sounds like what I am looking for. I was keen on buying the Licensing add on but I have very specific serials. Am I able to put my own license keys in? 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.