Leaderboard
Popular Content
Showing content with the highest reputation since 02/06/25 in Posts
-
While I understand that bugs are part of any Release Candidate cycle, it's concerning that we are still discussing basic optimization issues like proper OPcache support. And let's not even get started on the fact that we still don't have 100% native Nginx support. This becomes particularly ironic with the introduction of the new WHMCS Cloud Solution. With cloud hosting, the resource costs are on their side, so you'd think they'd be rushing to support Nginx to reduce their own infrastructure expenses. It's like being sold a high-performance engine but being told you have to power it with hamster wheels. Maybe once their bills start rolling in, Nginx support will suddenly become a priority. This all points to the bigger issue: the development velocity. Core development feels like it's just about "keeping the lights on" (PHP/ionCube updates) rather than actual innovation. This stagnation has allowed third-party developers like ModulesGarden to build entire businesses by selling us functionality that should have been in the core a decade ago. When you look at the "Total Cost of Ownership" license fees + necessary third-party modules, the value proposition is slipping. Newer platforms like Upmind are entering the market with an API-first architecture and modern features built-in from day one. If WHMCS continues to outsource innovation to the community while raising prices for maintenance updates, that competitive threat is going to become an exodus very quickly. We need core features that match the modern hosting landscape, not just compatibility patches.4 points
-
Hi WHMCS ecosystem developers! I am excited to share an early heads-up about the upcoming WHMCS 9.0 release by the end of 2025 - a major update that brings important changes to the platform’s technical requirements. As part of this release, several core dependencies will be updated, and minimum system requirements will be increased. These changes are designed to improve performance, security, and compatibility with modern PHP standards. Key Updates in WHMCS 9.0: Minimum PHP version: 8.2 Recommended PHP version: 8.3 Minimum ionCube Loader version: 13.0.2 or higher Recommended ionCube Loader version: 14.4.0 or higher Updated dependencies: A number of underlying libraries and components have been upgraded. Some notable changes include: Smarty v3.1.48 —> v4.3.4 Legacy Smarty Tags are being deprecated and will no longer function in 9.0. Smarty Template Objects (including their use in plugins) will no longer be supported. guzzlehttp v7.4 —> v7.4.5 illuminate v7.x —> v9.0 I have attached a provisional list of dependency changes to this post. Please also use this thread to provide your feedback and ask questions of the Development Team regarding these requirement and dependency changes. These changes will require action from module developers to ensure continued compatibility. We recommend reviewing your module code and preparing for updates ahead of the release. We’ll be sharing more details, including a release window, definitive changelog and developer guidance, between now and the end of 2025 to help you get ready. Thank you for being a valued part of the WHMCS ecosystem. We appreciate your continued support and look forward to working together to make WHMCS 9.0 a successful release. whmcsv90_composerlock_provisional.txt3 points
-
Okay, maybe I was too quick about credit notes. It seems a lot of the features are "coming soon™️". This is not a Release Candidate lol. This is not even alpha. This is internal development. Nothing can convince me that this release didn't just happen because WHMCS promised us a release in December.3 points
-
I never imagined that a simple update could introduce so many problems — and even worse, apparently without proper testing. It is absolutely ridiculous for a financial management system to have its own financial logic broken. In the last 24 hours, I finally received a response on the open support ticket, along with a so-called “patch” (attached). In practice, this patch only fixes the reports by hiding the incorrect ledger entries. However, in several other areas of the system, the incorrect postings are still happening. For example, the “Transactions” tab inside the client profile continues to show wrong values and misleading entries. So, in short, this patch does not actually fix the root problem — it only masks it in specific reports. For now, apply it if you want to slightly reduce the visible impact, but be aware that the financial logic is still broken in multiple parts of the system. At this point, we are seriously considering rolling back to a previous version — or even migrating away from WHMCS entirely. Year after year, the pricing increases exponentially, while the quality of support continues to decline and critical issues like this keep happening. The current level of instability and support simply does not justify the price they are charging anymore. whmcs_v9.0.0-supporthotfix.1_750a0b77ff.321_WHMCS-24949.zip2 points
-
Yeah, except for adding AI to domain search, this release doesn't really provide on any of the other promises. Credit notes doesn't work either. When you cancel an invoice, WHMCS just adds a transaction to the invoice. If the invoice has a total of $100, WHMCS just adds a transaction of $100 and cancels the invoice. There's no credit note or anything.2 points
-
How WHMCS have set this as a RC instead of a Beta is insane. It's a huge upgrade in terms of it's impact on themes/modules. No beta, no reply from WHMCS, no forums specific to v9.2 points
-
Your process sounds good apart from WHMCS. I would never recommend trying to import tables to new files. You need to update your existing install as normal. You can update from your version but you may have more luck doing a manual update. Backup everything, upload the new v8.13 files, adjust your hosting/server settings to meet the requirements (e.g you may need to update PHP) then run the installation script.2 points
-
@BENELUX, Today's the day!! https://blog.whmcs.com/133775/whmcs-90-release-candidate-out-now2 points
-
This week or next! It sure would be nice to double the size of the engineering team temporarily for one release every few years!2 points
-
@stormy, I'm glad to hear the e-invoicing feature will be a real value add for you. We are working with expert solution-providers in this space, so we're confident about delivering an easy to use and compliant solution with the broadest coverage. @andp97, Yes, by the end of the year in a pre-release version of WHMCS you will have access to this new feature. This bullet point actually describes two significant features which we're very excited about: 1. A RESTful API which provides access to the product catalogue and shopping cart logic. This will provide a suite of new endpoints to get product catalogue information, add, manipulate and get information about items in the cart (including price breakdowns and totals) and much more, all without touching the cart.php file or PHP session data. This means that power users could create their own highly-bespoke frontends whilst WHMCS handles the maths in the background, before seamlessly passing visitors to the checkout page to complete payment. 2. A brand new thin client powered by the aforementioned new API capabilities, providing a thoroughly modern purchase experience based on Vue.js. I've attached a sneak peak below. The new BuyFlow is a compiled Single-page application, meaning the layout isn't manipulated through templates, but you will be able to customise the colours to match your theme through a custom.css overrides file. The shopping cart as it exists today (cart.php and order form templates) isn't going away and will still be available if you'd like to stay with the familiar experience. Stay tuned to our blog and socials over the coming weeks for more information!2 points
-
Hi @venkat.j, The current latest version is 8.13. This behaviour suggests the dates were set to 00/00/0000, either by an admin (in which case there should be an entry in the client's Log tab) or by a rogue after-market module (in which case there probably wouldn't). You can edit the date fields to set the actual dates and click Save Changes. The correct dates will be stored.2 points
-
Hi all, In 8.13 a small improvement was made to the accounting of refunded mass-pay invoices. Prior to this the totals of mass-pay invoices were included in the overall income statistics, but now they are excluded as it's already accounted for by the original invoices.2 points
-
But you did ask them, and not by just posting here? EDIT: This is a bit old now, but a fast search on this board found:2 points
-
Hello @ThemeMetro This is a known issue, and we have published a HotFix. For more details, please review the following. Apologies for any inconvenience. Kind regards, Stephen.2 points
-
Thanks to @Mytihost, I found an elegant solution for this issue. The following hook: add_hook('ClientAreaPage', 1, function($vars) { if (!empty($vars['clientsdetails']['customfields'])) { $customfieldsAssoc = []; foreach ($vars['clientsdetails']['customfields'] as $field) { $customfieldsAssoc[$field['id']] = $field['value']; } return ['customfieldsAssoc' => $customfieldsAssoc]; } }); makes available the value of any client custom field in a template, using i.e. the form {$customfieldsAssoc.17} (where "17" is the id field in the tbl customfields)2 points
-
Hello, Not at all and it's highly recommended, to change the admin path.2 points
-
You may want to check in softaculous you may have the auto update turned on. Go into Softaculous find your install click on edit details auto upgrade select do not auto upgrade. With regards to 9.0 their will still be a lot of developers slightly behind. WHMCS didn't exactly give developers alot of notice with regards to the changes.1 point
-
Una buona notizia e' che il nostro team di sviluppatori sta attivamente lavorando per aggiungere la gestione di fatture elettroniche in una delle prossime release di WHMCS. In attesa di avere piu' dettagli nei prossimi mesi, non si hanno ancora tempistiche o specifiche. Certo e' che si potranno emettere fatture elettroniche in diversi formati, incluso Fattura PA. Per rimanere aggiornati potete sottoscrivere alla feature request corrispondente: https://requests.whmcs.com/idea/add-electronic-invoicing1 point
-
I have updated to WHMCS 9 In vendor files the folders was updated, but the folders not required anymore was not removed by the automatic update tool as when I compare WHMCS 8,13 and 9 they are removed. So remember to remove these manually people true sonata-project Facebook container-interop My questions why does the update process not clean and remove everything that is "old". What happend with the quality of the WHMCS releases .. .1 point
-
What I find somehow strange after being using WHMCS for 20 years.. when there was only 2-3 people in the company... bugs was fixed quickly often the same day. Now that I have a list of bugs reported many of them with 1 min solutions to implement, and they still doesnt get implement in X versions of whmcs 8x and still not fixed in WHMCS 9. So I dont know if being a large owned company is always a good thing. Just in December alone me and other people I work with found 3 new bugs of things that has been working since whmcs 5 and suddenly not working and per documentation should work.. I am actually concerned that the developing department / team doesnt have good working structure as they introduce bugs that should not be there that has been working for years. This make us need to use more time on testing before each upgrade and time testing is also a huge cost.. whmcs. should going forward be better in quality and also fixe the backlogs of bugs.1 point
-
am using 8.3 version now. i migrated my whmcs to a new server. but now the crons are not wrking properly. And am getting the following messages. Remove dead screens with 'screen -wipe'. #11 /home/mywhmcs/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Installer/Composer/ComposerUpdate.php(0): WHMCS\Installer\Composer\ComposerUpdate->doComposerCommand(Object(Closure)) #12 /home/mywhmcs/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Installer/Update/Updater.php(0): WHMCS\Installer\Composer\ComposerUpdate->getLatestVersion(true) #13 /home/mywhmcs/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Cron/Task/CheckForWhmcsUpdate.php(0): WHMCS\Installer\Update\Updater->fetchComposerLatestVersion() #14 /home/mywhmcs/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHMCS\Cron\Task\CheckForWhmcsUpdate->__invoke() #15 /home/mywhmcs/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHMCS\Scheduling\Task\AbstractTask->execute() #16 /home/mywhmcs/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Scheduling\Task\AbstractTask->run() #17 /home/mywhmcs/public_html/clients/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Cron\Console\Command\AbstractCronCommand->executeCollection(Object(WHMCS\Scheduling\Task\Collection)) #18 /home/mywhmcs/public_html/clients/vendor/symfony/console/Command/Command.php(255): WHMCS\Cron\Console\Command\AbstractCronCommand->execute(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 /home/mywhmcs/public_html/clients/vendor/symfony/console/Application.php(912): Symfony\Component\Console\Command\Command->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #20 /home/mywhmcs/public_html/clients/vendor/symfony/console/Application.php(264): Symfony\Component\Console\Application->doRunCommand(Object(WHMCS\Cron\Console\Command\AllCommand), Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #21 /home/mywhmcs/public_html/clients/vendor/symfony/console/Application.php(140): Symfony\Component\Console\Application->doRun(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #22 /home/mywhmcs/public_html/clients/crons/cron.php(0): Symfony\Component\Console\Application->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #23 {main}[mywhmcs@hmserver ~]$ ^C [mywhmcs@hmserver ~]$ /opt/cpanel/ea-php74/root/usr/bin/php -q /home/mywhmcs/public_html/clients/crons/cron.php all -F -vvv^C1 point
-
1 point
-
ETA: Estimated Time of Arrival. By definition, not exact. 😉1 point
-
Hello WHMCS Community! I'm thrilled to announce the release of Update 3 for the Stripe Checkout module for WHMCS, developed under RackNode! This update brings even more powerful features, making it easier than ever for businesses to cater to a global audience with a seamless and secure payment process. What’s New in Update 3? Expanded Payment Gateway Support The Stripe Checkout module already supports widely-used payment methods, including: PayPal Alipay Cash App Google Pay Apple Pay Link Card In addition to these trusted options, Update 3 introduces support for a wide range of new payment gateways to help you reach customers around the globe: WeChat Pay iDEAL Bancontact Giropay Sofort SEPA Debit EPS Przelewy24 (P24) OXXO Boleto FPX GrabPay Multibanco MobilePay Revolut Pay Amazon Pay (Beta) US Bank Account (ACH) TWINT Enhance checkout conversion rates by offering localized and regional payment methods your customers trust. Selectable Payment Gateways Now, you can choose a single payment gateway to display at checkout, offering a streamlined payment experience tailored to your business needs. Key Features (As Always): Multiple Payment Method Support: Accept payments via cards, Alipay, Cash App, and more. Adaptive Pricing: Automatically convert prices into local currencies, increasing global accessibility and conversion rates. Error Handling & Secure Webhook Integration: Ensuring secure, real-time payment confirmations with robust logging and signature verification. Seamless WHMCS Integration: Easy setup with just your Stripe credentials, making it a perfect solution for hosting providers and online businesses. Why Choose Stripe Checkout Module? Global-Ready: Accessibility for customers worldwide with local currencies and payment methods. Secure & Reliable: Built with security at its core, ensuring peace of mind for you and your customers. Pricing: $49 Per Year WHMCS Marketplace Documentation: For detailed setup instructions, visit our documentation: Documentation Questions or Customization Requests? Feel free to reply here or reach out directly to info@racknode.net for any inquiries or custom development needs.1 point
-
your API call isn’t using the filter array you think it is, and you’re reading the wrong field from the response. 1103 = totalresults for all unpaid invoices (because filters weren’t applied). 25 = numreturned default page size, with no limitnum specified. $clientid = (int) $vars['params']['userid']; $command = 'GetInvoices'; $postData = array( 'userid' => $clientid, 'status' => 'Unpaid', 'limitstart' => 0, 'limitnum' => 3000, ); $getClientInvoices = localAPI($command, $postData); // , $adminuser if needed $invoicecount = 0; if ($getClientInvoices['result'] === 'success') { $invoicecount = (int) $getClientInvoices['totalresults']; } if ($invoicecount >= 1) { logActivity( 'Service renewal will be aborted for client ' . $clientid . '. It is not qualified because it has ' . $invoicecount . ' unpaid invoices - by hook_send_renewal_notice_toadmin...' ); }1 point
-
Hello, It's very easy to resolve with Hook, just do Create a hook file at: whmcs/includes/hooks/invoice-lineitem-date.php <?php use Illuminate\Database\Capsule\Manager as Capsule; use Carbon\Carbon; add_hook('InvoiceCreationPreEmail', 1, function ($vars) { $invoiceId = (int) $vars['invoiceid']; $inv = Capsule::table('tblinvoices')->where('id', $invoiceId)->first(); if (!$inv) { return; } $dateText = Carbon::parse($inv->date)->format('d-m-Y'); $items = Capsule::table('tblinvoiceitems') ->where('invoiceid', $invoiceId) ->get(); foreach ($items as $item) { $isBillableItem = ($item->type === 'Item'); if (!$isBillableItem) { continue; } $newDescription = $item->description; if (strpos($newDescription, '{DAY}') !== false || strpos($newDescription, '{MONTH}') !== false || strpos($newDescription, '{YEAR}') !== false) { $newDescription = preg_replace( '/\{DAY\}\s*-\s*\{MONTH\}\s*-\s*\{YEAR\}/i', $dateText, $newDescription ); } else { $newDescription .= " ({$dateText})"; } Capsule::table('tblinvoiceitems') ->where('id', $item->id) ->update(['description' => $newDescription]); } });1 point
-
As you might know, whmcs has a problem with stripe: when the payment is not immediately confirmed by stripe (but requires to clic "capture" on stripe dashboard), whmcs does not record the order and the customer details and does not even send any notification to whmcs admin or to the customer. We solved with a hook that sends us an email with the order details, so that: - we know that there was a order attempt - we know that there might be a payment in stripe that requires manual "capture" - if necessary, we have all the client and order details in order to recreate the both client account and order. Here is the hook. <?php if (!defined("WHMCS")) { die("This file cannot be accessed directly"); } /** * Save all checkout data to a TXT file * AND email it to admin * Runs BEFORE order/invoice creation, and before redirect to Stripe. */ add_hook('ShoppingCartValidateCheckout', 1, function ($vars) { // --- 1. Clone and sanitise incoming data ------------------------------- $data = $vars; // Mask any possible card data (good practice even if Stripe never posts it) $sensitiveFields = [ 'ccnumber', 'cccvv', 'ccexpirymonth', 'ccexpiryyear', 'password', 'password2', ]; foreach ($sensitiveFields as $field) { if (!empty($data[$field])) { $data[$field] = '***masked***'; } } // --- 2. Attach cart contents from session (products, domains, etc.) --- $cart = isset($_SESSION['cart']) ? $_SESSION['cart'] : []; $payload = [ 'timestamp' => date('Y-m-d H:i:s'), 'ip' => $_SERVER['REMOTE_ADDR'] ?? null, 'user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? null, 'checkoutFields' => $data, 'cart' => $cart, ]; // --- 3. Build a text representation (for file & email) ---------------- $entry = "==============================\n"; $entry .= "Checkout submitted: " . $payload['timestamp'] . "\n"; $entry .= "IP: " . ($payload['ip'] ?? 'N/A') . "\n"; $entry .= "User-Agent: " . ($payload['user_agent'] ?? 'N/A') . "\n\n"; $entry .= "DATA:\n" . print_r($payload, true) . "\n\n"; // --- 4. Save to TXT file ---------------------------------------------- $logDir = __DIR__ . '/../../logs'; $logFile = $logDir . '/pre_stripe_checkout.txt'; if (!is_dir($logDir)) { @mkdir($logDir, 0700, true); } @file_put_contents($logFile, $entry, FILE_APPEND); // --- 5. Send email to admin ------------------------------------------- // This uses WHMCS' built-in admin notification helper. // The "system" type means it goes to the system email / admin notifications. if (function_exists('sendAdminNotification')) { $subject = 'Pre-Stripe Checkout Captured'; // Use <pre> so the print_r formatting is readable in HTML email $message = nl2br(htmlspecialchars($entry)); sendAdminNotification('system', $subject, '<pre>' . $message . '</pre>'); } // IMPORTANT: Do NOT return an error. Just let checkout continue. return; }); I suggest to implement it. It would be great if it would offer some sort of customization in the admin area.1 point
-
In the v9.0 release cycle we have focused efforts on updating our dependencies - which was quite a significant undertaking - ensuring that we carefully managed the Smarty update (as that is potentially an area of high user-impact). I anticipate this work will enable the testing and validation of future PHP versions to move much faster, and we expect to deliver PHP 8.4 support in v9.1. Please see the finalised list above. TCPDF will be updated to 6.10.1 point
-
1 point
-
can you maybe release an update to 8.13 to add a tool similar to the PHP compatibility tool that shows what files use these old components and won't be compatible? it'll help hosts like us that rely in multiple vendors plugins understand who we need to reach out too to ensure they're getting WHMCS v9 ready.1 point
-
Hello folks, I'm developing a custom payment gateway module and need to trigger a hook after the admin clicks "Save Changes" on the gateway configuration page (configgateways.php). I can see the POST request with the correct credentials (like App ID and Token) in my browser's dev tools. However, my hook isn't being triggered at all. ChatGPT suggested a GatewayConfigSave hook might exist, but I couldn't find any official documentation about it. I also tried AdminAreaPage and similar hooks, but none are reliably triggered with the config save event or POST data. Has anyone else run into this issue? Is there a recommended or undocumented hook to use when saving a gateway's settings?1 point
-
Hi all, We have published a hotfix which addresses the issue by reverting the change which introduced the non-performant query:1 point
-
@bear is right in this case. AI is generally only a help if you already know what you're doing. @MytihostYou can't solve the issue using Javascript. Javascript is a client side language, so you can only use it to manipulate the data you already have received from the client. If you only want to get a set amount of records for each page, you could use the limit() and offset() methods on your collection. Unfortunately, WHMCS doesn't support the paginate() method provided by Laravel. If you're retrieving thousands of records from the database, it's going to be slower than retrieving 50.1 point
-
@ThemeMetro, We've published 8.13.1 with a fix for this case.1 point
-
Hi @zomex, Following on from this. We now have this article available about the issue mentioned. https://help.whmcs.com/m/v813/l/1943753-captcha-tpl-template-error-when-clicking-login-as-owner1 point
-
We're pleased to announce the release of WHMCS 8.13 Release Candidate. This marks the end of feature development for the 8.13 series and is the final stage before version 8.13 is promoted to General Availability status. WHMCS 8.13 includes the following new functionality and enhancements: Manual User Password ResetsOne of our most requested admin features is here. With over 250 community upvotes, WHMCS 8.13 introduces the ability to reset a user's password directly from the Admin Area. This...View the full blog post1 point
-
I haven't noticed any difference, enom support still sucks just as much as it always has.1 point
-
Technically the other way round - opensrs bought enom and that’s when enom fell apart1 point
-
I'd recommend making a backup of any files you are planning to delete. Better yet, try moving the folder outside of WHMCS document root path. I would keep the files at minimum until you've either confirmed this solution has solved your issue or not. This way you can quickly restore your WHMCS back to its previous state in case of any unforeseen errors.1 point
-
That is true. I talked to both vendors, and they told me to contact WHMCS.com1 point
-
Loads fine in Firefox, but Vivaldi (and a few others) sees what he does. Related to a javascript that's loading. It's a webpros script.1 point
-
Hi @elonmusk, The LocalAPI user is invoked locally. Ie. By a file on your website that isn't a part of the stock WHMCS software. This will likely be an after-market customisation, perhaps something like a custom order form. I suggest comparing your WHMCS files against the stock ones for any additionals you may have, as they could be the cause.1 point
-
1 point
-
Lagom WHMCS Client Theme has been updated to 2.0 version! Order Now Changelog Documentation Services Contact Different Styles & Colors Lagom WHMCS Client Area Theme consists of 4 unique styles. There are 5 different color schemes available for each style. Modern Futuristic Default Depth Style Manager Provides essential tools used to manage Lagom theme colors and styles without having any technical know-how. You will be empowered to apply various Styles and Color Schemes to tailor our theme to your brand style. Learn More Menu Manager From now on, you do not need to create complicated WHMCS hooks to modify the Lagom theme navigation. Menu Manager delivers a super convenient option to set up the menu items from the WHMCS addon. Learn More Multiple Layouts Make full use of 5 unique layouts for the main menu navigation and 2 various layouts for the footer. Other Lagom Features Login Based Layouts Display different menu and footer layouts based on the customer's login status. Learn More Basic SEO Management Manage SEO for selected theme pages. Assign your custom page title, description, and social image. Learn More Custom Layout for Pages Assign a unique Lagom Layout to specific pages and overwrite settings made in Layout Manager. Learn More Affix Theme Navigation Affix the top Lagom theme navigation when a customer scrolls your website up. Learn More Multiple Element Styles Using a few simple clicks you can choose from 3 different styles available for particular Lagom elements. Learn More Multiple Page Templates Define various templates for selected Lagom theme pages and configure its settings. Learn More Different Fonts Change Font Family used in the Lagom theme with a few simple clicks. Learn More Affix Theme Sidebars Affix theme sidebars to the top of the browser window. Learn More Hide Sidebars Hide Lagom theme sidebars for selected pages in Page Manager. Learn More1 point
-
@sajibdesigns You need to select a Registrar from the dropdown before clicking accept order1 point
-
Hi. For convenience, I wanted to create a custom model for my module. I didn't like having to call Capsule every time I needed information that the module stored in the database. I want to share the code here in case other people didn't know how to do it but also to gather some feedback on this way of doing it. <?php namespace WHMCS\Module\Addon\MyModule; use WHMCS\Model\AbstractModel; /** * Convenience model for custom modules */ class MyModel extends AbstractModel { // Set the table that should be used for searching protected $table = 'mod_mymodule'; // We almost always have access to the service ID. Has to represent a column in the mod_mymodule table protected $primaryKey = 'serviceid'; } When using the model, we're able to do MyModule::find() or create a new instance using 'new MyModule()'.1 point
-
Ok, managed to find a solution using a hook: <?php use Illuminate\Database\Capsule\Manager as Capsule; if (!defined("WHMCS")) die("This file cannot be accessed directly"); function StripEmailTicket($vars) { $str = $vars['message']; $pattern = "/On.*(\t|\n|\r|\b).*wrote:/"; $message = preg_replace($pattern, "", $str); Capsule::connection()->statement("UPDATE tblticketreplies SET message = '" . mysql_real_escape_string($message) . "' WHERE id = '" . intval($vars['replyid']) . "'"); } add_hook('TicketUserReply', 0, 'StripEmailTicket'); ?>1 point
-
Apologies for bringing an old thread back from the dead but this issue has reared its ugly head again in version 8.13. We had an issue with a smarty variable in a custom template file triggering a security policy error so WHMCS Support suggested adding this security policy to our config file: // Smarty enable special variables policy: $smarty_security_policy = array( 'system' => array( 'enabled_special_smarty_vars' => array( 'session', 'foreach', 'section', 'block', 'capture', 'now', 'get', 'post', 'server', 'request', 'template', 'const', 'strstr', ), ), ); This fixed the issue with the template not working but now we are getting a "'strstr' not allowed by security setting" error when trying to send any email that contains this: {if strstr($client_credit, "GBP")}Blah blah blah{/if} The original security policy we had in place to allow "strstr" is still there but doesn't work if we also have the new "'system'" security policy in place, it works fine if we remove this leaving just the original security policy but ideally we need both the custom template and the code in the email to work! FYI our full security policy is listed here: // Smarty custom email based template policy: $smarty_security_policy = array( 'mail' => array( 'php_functions' => array( 'strstr', ), ), ); // Smarty enable special variables policy: $smarty_security_policy = array( 'system' => array( 'enabled_special_smarty_vars' => array( 'session', 'foreach', 'section', 'block', 'capture', 'now', 'get', 'post', 'server', 'request', 'template', 'const', 'strstr', ), ), ); Any ideas how to fix or if not, is there another workaround we could use to display conditional data depending on the currency used by the client?1 point
-
Hello @Blasgo Thanks for your post, if you have registered the domain with your registrar then you will need to follow the "Manual Domain Entry Only" process To add a domain on its own without a product, follow the steps below: If you haven't already, create the client by navigating to Go to Clients > Add New Client. On the client summary page, click the "Add New Order" link in the Actions panel The client will be preselected, so you should fill out the rest of the form - begin by choosing the payment gateway you want the client to pay with Leave the Product/Service dropdown menu set at None Leave the Billing Cycle dropdown menu set at Monthly Enter the domain in the Domain text field and select Register as the Domain Registration Option (even though you aren't intending to register it today) Choose the number of years you next want the client to be invoiced for at the time of renewal and tick any addons the user has for their domain Ensure both tick boxes for sending an order confirmation and generating an invoice are unchecked so the user is not emailed about the order you are adding Finally, set the Order Status dropdown to Active and then click the submit button to add the order to WHMCS You will now be shown the order screen summarising the details of the order you just added Now as the final step, you must go to the domain's information page to enter the correct next due and expiry dates as well as selecting the registrar the domain is registered with if using one of the built-in registrars. To do this, from the order screen, click on the link in the Item column of the items ordered - this will take you straight to the details screen.1 point
-
which is the definition of a lookup provider. all i'm saying is that WHMCS 7 is designed to either use whois, or a lookup provider, for ALL TLDs - you can't mix and match, e.g this module for .ge, but whois for .com - you have to put all your eggs in one basket.1 point
