baymax Posted December 30, 2019 Share Posted December 30, 2019 Hi Everyone, So we're using WHMCS a bit differently than most since we're tracking domains that WE own as a company. I am trying to add a new registrar to the list of options that we can select in the Domains page. Here's what I've done so far: 1. I downloaded the sample registrar module, made adjustments to the Title etc. and put the files into the \modules\registrars\ folder 2. The registrar shows up on the list of Domain Registars and I was able to activate it. I was also able to select the Registrar on a specific domain. 3. Here's when I encountered a problem. We don't really use hooks or API since we're doing things manually and clients don't need access to the system nor do renewals etc via WHMCS. As soon as I make the domain's registrar to the new one I added, the domain page for that customer no longer works and produces the following error: Oops! Something went wrong and we couldn't process your request. Please go back to the previous page and try again. Please Note: I really just need it to show up on the list. I have it setup the same way for GoDaddy and left the API information blank. It produces an error upon loading the Domains page (this is fine as long as it loads the page). I am not sure what to add or remove from the sample registrar module files in order to fix this. I am no programmer by any means. Any help would be really appreciated! Thank you. 0 Quote Link to comment Share on other sites More sharing options...
baymax Posted December 30, 2019 Author Share Posted December 30, 2019 More information about the error: Error: Class 'WHMCS\Module\Registrar\Registrarmodule\ApiClient' not found in /var/www/html/whmcs/modules/registrars/aliyun/aliyun.php:575 Stack trace: #0 /var/www/html/whmcs/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): aliyun_GetNameservers(Array) #1 /var/www/html/whmcs/vendor/whmcs/whmcs-foundation/lib/Module/Registrar.php(0): WHMCS\Module\AbstractModule->call('GetNameservers', Array) #2 /var/www/html/whmcs/vendor/whmcs/whmcs-foundation/lib/Domains.php(0): WHMCS\Module\Registrar->call('GetNameservers', Array) #3 /var/www/html/whmcs/vendor/whmcs/whmcs-foundation/lib/Domains.php(0): WHMCS\Domains->moduleCall('GetNameservers') #4 /var/www/html/whmcs/admin/clientsdomains.php(0): WHMCS\Domains->getDomainInformation() #5 {main} I tried editing those lines out of the aliyun.php file but I don't think I did it correctly. As mentioned, the new registrar just needs to be listed as a registrar option but does NOT need to communicate with the registrar. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 31, 2019 Share Posted December 31, 2019 On 30/12/2019 at 06:37, baymax said: 3. Here's when I encountered a problem. We don't really use hooks or API since we're doing things manually and clients don't need access to the system nor do renewals etc via WHMCS. if the blank registrar module has no functionality, you're processing manually and using this for your own domains, wouldn't it be easier just to use the Email registrar ? https://docs.whmcs.com/Email 0 Quote Link to comment Share on other sites More sharing options...
baymax Posted January 1, 2020 Author Share Posted January 1, 2020 17 hours ago, brian! said: if the blank registrar module has no functionality, you're processing manually and using this for your own domains, wouldn't it be easier just to use the Email registrar ? https://docs.whmcs.com/Email Hi Brian! Yup, I saw and thought about using that but the thing is we need the name of the registrar because we have domains with various registrars. That and we run reports too so this function is very important. Is there an easier way to add a custom module but no API functionality? Mine's just producing errors left and right. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 1, 2020 Share Posted January 1, 2020 5 hours ago, baymax said: Is there an easier way to add a custom module but no API functionality? Mine's just producing errors left and right. if there is no functionality or automation needed, then i'd still stick with using the Email Registrar idea - but remember that this registrar module code isn't encrypted and therefore can be duplicated and modified. 😉 to duplicate the registrar, all you should need to do is... copy the "email" folder in /modules/registrars - for the sake of argument, paste the duplicated folder and call it "brian" - still in /modules/registrars/ go into the duplicate folder, e.g brian, and rename email.php to brian.php - for consistency keep the folder and filenames the same (and just one word). edit the brian.php file and replace occurrences of "email_" with "brian_" (there should be 6)... these functions need to be unique, so if email registrar is active, and this duplicate is active, you will get errors - so you have to rename the functions. edit the Friendly name line of code to differentiate this from the default email registrar... "FriendlyName" => array("Type" => "System", "Value"=>"Email Notifications (Brian Registrar 1)"), ... so you know which registrar this is to be used with... optionally change the logo. repeat as necessary for other registrars. on the Domain Registrars page, you will now have 2 different email registrars... and in a client's domain profile, it will be available as an option... in your case, what I would probably suggest is that you don't use the original Email Registrar module if you are going to rename it (e.g give it the name of a registrar) because a WHMCS update would probably overwrite any changes that you make to the module - so just use the duplicates that you make and the updater shouldn't touch them. 3 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Sachin Posted January 1, 2020 WHMCS Technical Analyst Share Posted January 1, 2020 looks like @brian! already got you covered. You can indeed duplicate the Email module and use it as per your needs. 1 Quote Link to comment Share on other sites More sharing options...
baymax Posted January 2, 2020 Author Share Posted January 2, 2020 @brian! It's people like you that I love 🙂 I will give that a try. Thanks for the continued help! Happy New Year! Cheers! 1 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.