Jump to content

WHMCS Nathan

WHMCS Technical Analyst
  • Content count

    18
  • Joined

  • Last visited

Community Reputation

4 Neutral

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

    Hooks - Hide menu for a specific product.

    There are a number of ways that you could achieve this. One of the ways this could be accomplished is with the ClientAreaProductDetails and ClientAreaPrimarySidebar hook points. You would be using the ClientAreaProductDetails hook point to get the Package ID, and then nest the ClientAreaPrimarySidebar hook point inside that to modify the sidebar. Information about these two hook points can be found at the following URLs: https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareaproductdetails https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareaprimarysidebar The ClientAreaProductDetails hook point returns the Service class which you can read more about at https://docs.whmcs.com/classes/7.1/WHMCS/Service/Service.html I have taken a moment to put together a basic example of such a hook. You can review this below: <?php $data['packages'] = array('1'); // Array of Package IDs to be affected $data['children'] = array('Login to cPanel', 'Login to Webmail', 'Change Password'); // Array of Children to be removed add_hook('ClientAreaProductDetails', 1, function ($vars) use ($data) { $packageId = $vars['service']->packageId; if (in_array($packageId, $data['packages'])) { add_hook('ClientAreaPrimarySidebar', 1, function ($primarySidebar) use ($data) { $targetSidebar = $primarySidebar->getChild('Service Details Actions'); if ($targetSidebar) { foreach ($data['children'] as $child) { $targetSidebar->removeChild($child); } } }); } });
  2. WHMCS Nathan

    Adding element(s) to price-area

    If you're encountering an "Oops!" page, then that indicates that a PHP error has occurred. You'll want to enable the Display Errors option in the Setup > General Settings > Other section of your Admin Area, and then reproduce the issue. You should then see a PHP error displayed which you can use to determine what the issue with the hook-file is.
  3. WHMCS Nathan

    Client email

    The Emails tab on the Client Summary is designed to function similarly to the System Email Message Log. On a stock installation, I would expect you to be able to click on the subject and see a window containing the email content pop up. I've setup a fresh installation of WHMCS Version 7.7.1 with PHP 7.2, created a new client, and sent some emails to the client from the Admin Area. After doing so I went to the Client Summary, navigated to the Emails tab, and verified that clicking on the subject caused the pop-up to appear without issue. It looks like whatever you've got going on is limited to your installation. I'd suggest going through the troubleshooting guide at https://docs.whmcs.com/Troubleshooting_Guide and if you are not able to determine the cause then I'd open up a support ticket with our team so that we can take a look.
  4. 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
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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/
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. 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
  15. 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!
×

Important Information

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