Jump to content


WHMCS Technical Analyst
  • Content Count

  • Joined

  • Last visited

  • Days Won


WHMCS Anwar last won the day on October 19 2022

WHMCS Anwar had the most liked content!

Community Reputation

8 Neutral


About WHMCS Anwar

  • Rank
    WHMCS Technical Analyst

Recent Profile Visitors

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

  1. Open-Xchange has announced upcoming planned Maintenance Windows for the second quarter of 2023. Here are the planned Maintenance Windows: 5th of April 2023 (2023-Apr-05) 4th of May 2023 (2023-May-04) 7th of June 2023 (2023-Jun-07) As in the past the infrastructure maintenance windows are independent from those and announced separately.
  2. It appears that this error is emanating from a third-party add-on, located in /home/demo/clientarea.Demo.com/modules/addons/cWatch/ Please note: as this is not an add-on supplied or shipped with WHMCS, you would need to contact the add-on vendor directly for support and updates.
  3. Thank you for confirming. Go ahead and open a ticket with our technical support team, so we can take a closer look, and hopefully find the underlying issue.
  4. If you are still experiencing this issue, can I ask, are you using a custom / third-party template? If so, could you try to see if you can reproduce the issue using our stock default Twenty-One system template, and Standard Cart order form template. For further information, visit https://help.whmcs.com/m/customisation/l/680993-changing-the-system-template https://help.whmcs.com/m/order_forms/l/678181-change-your-order-form-template If for some reason, the issue continues, please open a ticket with our technical support team, where we will be glad to look into this for you.
  5. Intelligent Search can be extended to allow you to perform custom searches and return the results of entries that would not otherwise be searchable. This can be custom data anywhere within your WHMCS database, that you wish to find. To accomplish this, we will be using the Intelligent Search hook point. We will elaborate on the sample code provided, which will form the basis of this guide and be adapted for constructing our own custom search. <?php add_hook('IntelligentSearch', 1, function ($vars) { /** * This is an example of array return for an Intelligent Search. * This format is supported in the blend WHMCS Admin Template. * Any template based on blend and updated to WHMCS 7.7+ is also supported. */ $searchResults = array(); // look for exact matches in client notes field $result = \WHMCS\Database\Capsule::table('tblclients') ->where('notes', $vars['searchTerm']) ->get(); foreach ($result as $client) { $searchResults[] = [ // The title of the search result. This is required. 'title' => $client->firstname . ' ' . $client->lastname, // The destination url of the search result. This is required. 'href' => 'clientssummary.php?userid=' . $client->id, // An optional subtitle for the search result. 'subTitle' => $client->email, // A font-awesome icon for the search result. Defaults to 'fal fa-star' if not defined. 'icon' => 'fal fa-user', ]; } return $searchResults; }); Here, we can see that intelligent search results have been expanded to successfully retrieve client note entries. Using the same concept, we are now going to show you, how to search within Ticket Notes. Construct a SQL Query for the Data to be Retrieved We will need to identify the data fields which we need to search, retrieve and then display in the search results. Once we have identified the particular fields we require, we will construct an SQL Query that can display the data we require. We would like to search the messages in ticket notes, so the tblticketnotes would precisely be the table we need. However, for our search results to have more meaning, it would be useful to have the ticket title for the note. As this field resides in another related table: tbltickets, we will require an INNER JOIN in our SQL query ON, tbltickets.id = tblticketnotes.ticketid Now that we know exactly the data we require, and where to join; using our favourite SQL query builder (or editor) we can go ahead and construct our query: Once we have constructed the query, it would be prudent to preview the query, to see if the results yield the dataset that we require: As you can see from the query results above, we are successfully able to find all ticket notes on the system as well as their ticket titles and other useful data to display in our search results. It is important that the results contain only the data required, in order to maximize efficiency. Constructing the Query for the Hook We must create a Laravel Query equivalent for the raw SQL query above when using Database Capsule. For more information, visit https://laravel-guide.readthedocs.io/en/latest/queries/#joins Using our raw SQL query, we should arrive at the following query for our hook: $query = Capsule::table('tblticketnotes') ->select( 'tblticketnotes.ticketid', 'tblticketnotes.date', 'tblticketnotes.message', 'tbltickets.title' ) ->join('tbltickets', 'tbltickets.id', '=', 'tblticketnotes.ticketid') ->where('tblticketnotes.message', 'LIKE', '%' . $vars['searchTerm'] . '%') ->orderBy('date', 'desc') ->get(); Once we tweak the search result output to suite our needs, our final hook should look like this: <?php use WHMCS\Database\Capsule; if (!defined("WHMCS")) die("This file cannot be accessed directly"); add_hook('IntelligentSearch', 1, function ($vars) { $searchResults = array(); $query = Capsule::table('tblticketnotes') ->select( 'tblticketnotes.ticketid', 'tblticketnotes.date', 'tblticketnotes.message', 'tbltickets.title' ) ->join('tbltickets', 'tbltickets.id', '=', 'tblticketnotes.ticketid') ->where('tblticketnotes.message', 'LIKE', '%' . $vars['searchTerm'] . '%') ->orderBy('date', 'desc') ->get(); foreach ($query as $show) { $searchResults[] = [ // The title of the search result. This is required. 'title' => 'Ticket Notes - Support Ticket ID: ' . $show->ticketid, // The destination url of the search result. This is required. 'href' => 'supporttickets.php?action=view&id=' . $show->ticketid , // The title of the search result. This is required. 'subTitle' => $show->title . ' ' . $show->date . ' ' . $show->message, // A font-awesome icon for the search result. // Defaults to 'fal fa-star' if not defined. 'icon' => 'fal fa-star', ]; } return $searchResults; }); To use the hook, we save it as a PHP file and place it in our /includes/hooks/ folder and simply perform a search: Performing a search, should now include results from Ticket Notes. At the time of writing this post, this script was tested on the latest stable release of WHMCS 8.5.1 and should work with any that fall under Active Support as per the LTS schedule here: https://docs.whmcs.com/Long_Term_Support#WHMCS_Version_.26_LTS_Schedule If you have any feedback or questions, please feel free to reply to this thread!
  6. Hi there, At the time of writing this, we have been told that the limits are: 500 / hour and 5000 / day for total number of emails, and 100 recipients per email limit as well
  7. Hi there, Please note that a 500 Internal Server Error is a generic error message produced by the server, often due to a misconfiguration. There are potentially a wider number of causes for such a problem, here is a brief overview of them and potential fixes: File Permissions are incorrectly set. Should be (depending on server but general rule of thumb) 644 for files and 755 for folders/directories. PHP Memory & Process limitations - Try increasing to 128MB PHP Process Limitations - Check with server admin/hosting provider Corrupt PHP Modules, Extensions, Builds - Check with server admin/hosting provider The obscure - If points 1-4 don't produce a fix typically the best course of action is to check the Apache Error Logs Although this is not a definitive list, it should provide you with a good starting point for the purposes of troubleshooting.
  8. Hi there, A redirect loop occurs when a website instructs your browser to redirect to a page, which then instructs your browser to redirect to a different page. This continues until your browser stops redirecting and signals that a redirect loop has occurred. This number varies from browser to browser, but is often about 21. Typically, this is the result of a misconfiguration on the website or server. We have a Troubleshooting a Redirect Loop guide that explains some probable causes and resolution steps for this issue. Checking WHMCS Configuration Checking mod_rewrite Rules .htaccess Cloudflare SSL For detailed troubleshooting instructions, visit https://help.whmcs.com/m/troubleshooting/l/802231-troubleshooting-a-redirect-loop
  9. We would not advise that you place your WHMCS folder within a subfolder of another PHP script, such as, WordPress. One of the reasons is because, WordPress will have its own .htaccess rules implemented, which may interfere with the access and operation of subfolders below. Another reason would be, that each script usually expects the folders beneath them, as belonging to them. Sometimes operations may be performed across subfolders, which would then, in turn, result in WHMCS being affected if were to be placed in a subfolder. Instead, it would be better, unless otherwise stated, for PHP scripts such WHMCS, WordPress, Joomla, etc, to be placed in separate folders “beside” one another. Example: /your/home/public_html/wordpress /your/home/public_html/whmcs (Of course the folder names can be of your own choosing) I hope this helps.
  10. Hi there, "Processing Credit Card Charges" cron task is responsible for capturing credit card payments, and it is scheduled to be run only once daily, as part of the daily scheduled cron. It has not been designed to run more than once in a day. For further details, visit https://docs.whmcs.com/Crons#Task_Options_for_skip_and_do As far as the "Attempt Only Once" checkbox is concerned, here it means that, capture of payment will only ever be attempted once, and not retried again. If you wanted the payment capture to be retried, then you would leave this option unchecked and enter a value for "Retry Every Week For" the number of weeks you wish the capture attempts to be made. For further information, visit https://docs.whmcs.com/Automation_Settings#Attempt_Only_Once https://docs.whmcs.com/Automation_Settings#Retry_Every_Week_For
  11. We're aware that the Ioncube v12 has recently been released which adds support for PHP 8.1. Our team are actively developing our new version of WHMCS encoded with Ioncube v12. This will allow us to deliver PHP v8.1 compatibility. Very shortly we will be publishing a blog post at https://blog.whmcs.com which will provide details of everything we are doing and what you can expect in this regard. If you'd like to receive an email notification once the blog post is released, please subscribe to this feature request: https://requests.whmcs.com/idea/php-8-0-support
  12. Thank you for clarifying. As this is an order request, then I would suggest you post this request along with your specifications at Service Offers & Requests https://whmcs.community/forum/137-service-offers-requests/ This should attract members of our community that to offer their services to hopefully fulfil your request.
  13. Hi there, We have Sample Third-Party Payment Gateway Module files on GitHub, in order to demonstrate how we suggest a Third-Party Payment Gateway module for WHMCS be structured and implemented: https://github.com/WHMCS/sample-gateway-module For detailed information, please refer to the documentation at https://developers.whmcs.com/payment-gateways/ I hope this helps.
  14. Are you using Google ReCaptcha? If not, then will be a great place to start, especially if spam is the main issue. However, if you already have this setup, then it could be that the Pre-Sales form does not have captcha enabled. You can choose which forms have a captcha enabled on them by checking the appropriate boxes in "Captcha for Select Forms". The following options are available: Shopping Cart Checkout - On checkout in the Client Area Domain Checker - The homepage domain checker, and on the Register or Transfer domain pages in the cart Client Registration - register.php Contact Form - contactus.php Ticket Submission - When submitting a ticket Login Forms - Admin and Client login forms Please ensure that it is enabled on all forms, to reduce spam. For further information, visit https://docs.whmcs.com/Google_reCAPTCHA#Captcha_Locations
  15. Email Campaigns use cron automation to schedule the sending of emails in batches. If for some reason you have an issue with cron, then this will prevent emails from being sent. However, cron running every 5 mins does not necessarily mean it is completing successfully. And even if it were completing, it doesn't mean it is doing so, without errors. In light of this, could you please check to see that you cron is setup and running and completing successfully without any errors. More information regarding this can be found at https://docs.whmcs.com/Email_Campaigns#Internal_Queue_vs._External_Send_Requests We have a step-by-step guide for Troubleshooting the cron not completing in our online documentation at: https://help.whmcs.com/m/automation/l/678272-troubleshooting-the-cron-not-completing Along with a more advanced cron troubleshooting guide that is available at: https://help.whmcs.com/m/automation/l/683269-advanced-cron-troubleshooting Following them through usually resolves this, but please go ahead and create a ticket with us at technical support if you need further assistance.
  • Create New...

Important Information

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