Jump to content

WHMCS Nathan

WHMCS Technical Analyst
  • Content count

  • Joined

  • Last visited

Community Reputation

12 Good

About WHMCS Nathan

  • Rank
    WHMCS Technical Analyst

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. WHMCS Nathan

    config options

    This behavior usually indicates that something in the PHP configuration is limiting the amount of data that can be submitted via the form. I would try increasing the following PHP and Suhosin values: request.max_vars max post.max_vars post.max_array post_max_size max_input_vars You'd want to increase these values until all data submitted to the form is accepted
  2. WHMCS Nathan

    Whmcs not pass data correct

    Data passed to the $params parameter will see all of the non-latin characters transliterated to their latin counterparts. This is done because some registrars will return errors should they receive a non-latin character. You can read some about this at https://docs.whmcs.com/Custom_Transliteration As you have discovered, the original (non-transliterated) data is stored in the ['original'] array so you can have your registrar module access that via $params['original'] instead.
  3. WHMCS Nathan

    Validation Help

    You could look into using the ShoppingCartValidateCheckout hook-point for this: https://developers.whmcs.com/hooks-reference/shopping-cart/#shoppingcartvalidatecheckout The products and configuration are stored in $_SESSION[‘cart’] so you could loop through those to ensure that your validation requirements are met. If they aren't, then you could return an error which would prevent the checkout process from completing.
  4. Your modules do not need to be encoded for use with WHMCS. They can remain unencoded, and will operate as normal. If you choose to encode your completed module using ionCube, then you are welcome to do so.
  5. WHMCS Nathan

    Run hook on specific domain order

    Nope, can't see any immediate issues with those. If you have a development installation, then I would recommend testing them to see how they work out for you.
  6. WHMCS Nathan

    Run hook on specific domain order

    You can create new Order Statuses in your Admin Area via the Setup > Other > Order Statuses section. You can find some information about this at https://docs.whmcs.com/Order_Statuses Sure, there are a number of hook-points that you could use. Which you use depends on when you want to run these two actions. For example, if you wanted WHMCS to mark any order containing a .dk TLD as fraudulent, then you could do something like: <?php use \WHMCS\Domain\Domain; add_hook('AfterShoppingCartCheckout', 1, function($vars) { foreach ($vars[Domains] as $domainID) { if (Domain::find($domainID)->tld === 'dk' && in_array(Domain::find($domainID)->type, array('Register', 'Transfer'))) { $results = localAPI('FraudOrder', array('orderid' => $vars['OrderID'])); break; } } }); This hook will automatically mark any order placed via the Client Area, that has a .dk TLD registration or transfer, as fraudulent. You can read about the various elements used in this hook example at the following URLs: https://developers.whmcs.com/hooks-reference/shopping-cart/#aftershoppingcartcheckout https://docs.whmcs.com/classes/7.6/WHMCS/Domain/Domain.html https://developers.whmcs.com/api-reference/fraudorder/
  7. WHMCS Nathan

    Connection and Upgrading Error

    The best way to get more information about what's happening when you click on the "Test Connection" button would be to use the Module Debug Log. This log'll let you review the API request that WHMCS is making, and the API response that it is receiving from your server. Ultimately, it should give you an idea about what's going on and what's causing the error. You can read more about how to use this tool at https://docs.whmcs.com/Troubleshooting_Module_Problems Also, you can find WHMCS's support page at https://www.whmcs.com/support/ if you find that you need more hands on help from our Technical Analysts.
  8. If you want WHMCS to generate a renewal invoice that's actually associated with the client service, then you'll want to do the following: 1. Increment the Next Due Date for the Service forward one day 2. Generate Invoices for that service via the Client Summary 3. Increment the Next Due Date backwards one so that its back where it was 4. Edit the newly generated invoice so that the Billing Period in the Invoice Item matches the Next Due Date When the customer goes to pay this invoice, then the Next Due Date will increment forward as expected.
  9. WHMCS Nathan

    Register only when purchasing a product

    There's an option called "Allow Client Registration" that you can disable. When this option is disabled new registration can only be completed when placing an order. You can locate the option in your Admin Area by navigating to Setup > General Settings, and then clicking on the Other tab.
  10. WHMCS Nathan

    How to track down things.

    There are a few ways to figure this out. For Ghost Crab, I'd bet that it was suspended for non-payment. I'd go check on the service in your Admin Area and make sure the Next Due Date isn't somewhere in the past. You can also go to the Client Log for that client, and then look through to see when the suspension attempt happened. For the weird one with the empty Client/Service value, you're going to want to find out what it is. For me, the easiest way would be by reviewing the tblmodulequeue table in the database. You'll want to locate the rows responsible for the two entries you're seeing in the Module Queue, and then take note of the Service ID. Once you've identified the Service ID then you can address it as needed.
  11. WHMCS Nathan

    Modules question

    This sounds kind of like the exact thing that the "Product Custom Fields" feature was implemented for. This feature allows the setup some custom fields where a client can enter in details on their own when placing an order. You can read more about this feature at https://docs.whmcs.com/Custom_Fields#Product_Custom_Fields
  12. WHMCS Nathan

    WHMCS Language 7.4.2

    The easiest way to grab a missing file from WHMCS would be to download a fresh copy of the full release for v7.4.3 from https://download.whmcs.com/ After you've got it downloaded, you can extract the archive, locate your file, and then get it uploaded to your server!
  13. WHMCS Nathan


    This sort of error usually means that your web server is running ionCube Loaders v10.0 or earlier. Basically, you'll want to make sure that your web server is running ionCube Loader v10.1.0 or later, because that's what's required by WHMCS 7.5 and on. There's a great troubleshooting document you can check out at http://help.whmcs.com/m/75601/l/851363-troubleshooting-a-the-file-path-to-whmcs-index-php-is-corrupted-error which covers this in detail.
  14. In WHMCS Version 6.3 the Email Verification functionality was introduced; if you are not familiar with this feature then you can read more about it at https://docs.whmcs.com/Client_Email_Verification. When this feature is enabled WHMCS will no longer send the "Client Signup Email" template, but will instead deliver the "Client Email Address Verification" template to the client. In this post we are going to be introducing a fairly basic hook that ensures both the "Client Email Address Verification" and "Client Signup Email" templates are delivered to the client upon signup. You can download this hook in a .txt file directly by clicking on the following link: verifywelcomeemail.txt. Once downloaded, you can rename this "verifywelcomeemail.php" and upload it to the "includes/hooks" directory on your server. Alternatively, you can create a new .php file, preferably named something that let you know what the file does at a glance, in the "includes/hooks" directory on your server. Then you can copy the code below, paste it into your new .php file, and save it. <?php /** * * This hook sends out the 'Client Signup Email' * template when 'Email Verification' is enabled. * * @package WHMCS * @author WHMCS Nathan * @copyright Copyright (c) WHMCS Limited 2005-2017 * @license https://www.whmcs.com/license WHMCS Eula * @link https://www.whmcs.com/ * */ if (!defined('WHMCS')) { die('This hook should not be run directly'); } use WHMCS\Config\Setting; function sendSignupMail($userId){ $postData = []; $postData = [ 'messagename' => 'Client Signup Email', 'id' => $userId, ]; $results = localAPI('SendEmail', $postData, 0); } add_hook('ClientAdd', 1, function($vars){ $emailVerificationStatus = Setting::getValue('EnableEmailVerification'); if($emailVerificationStatus){ sendSignupMail($vars['userid']); } }); This hook relies on a couple elements to function; first it is executed when the ClientAdd hook is run. This hook executes any time a client is being added to WHMCS. An in depth read-out of this hook can be located at https://developers.whmcs.com/hooks-reference/client/#clientadd. Once the hook is run it then uses the Setting::getValue class and method to check whether or not Email Verification is enabled on the installation. Detailed information about this class, and its methods, can be found at https://docs.whmcs.com/classes/7.1/WHMCS/Config/Setting.html. Once it has verified that Email Verification is enabled on the installation, it then uses the localAPI to send a SendEmail command to WHMCS. This command is used to send out the "Client Signup Email" tenmplate itself. Information about the SendEmail command can be found at https://developers.whmcs.com/api-reference/sendemail/. Those two components are all that this hook is really made from, and as such there is not much that can go wrong. With that said, at the time of this writing, this hook was tested with the current versions of WHMCS that fall under Active Support as listed at https://docs.whmcs.com/Long_Term_Support#Active_Development and is not guaranteed to work with prior versions of WHMCS. If you have any feedback, comments, or questions concerning this hook then please let me know; I would be more than happy to address them!

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated