Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About actionhosting

  • Rank

Recent Profile Visitors

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

  1. @tangogc if you add me to skype we can chat my skpe is ACTIONHOSTING. Note I have not tested this on 8.0.x the code is running on 8.1 Brian
  2. Thanks Brian, I did notice it and fixed it. I didnt advise as the pending module action is similar. Here is my updated code . <?php namespace WHMCS\Module\Widget; use WHMCS\Carbon; use WHMCS\Clients; use WHMCS\Module\AbstractWidget; use WHMCS\Module\Queue as ModuleQueue; use WHMCS\Orders; use WHMCS\Billing\Invoice; /** * Badges Widget. * * @copyright Copyright (c) WHMCS Limited 2005-2018 * @license https://www.whmcs.com/license/ WHMCS Eula */ class WSIBadges extends AbstractWidget { protected $title = 'WSIBadges'; protected $description = ''; protected $columns = 3; protected $weight = 0; protected $wrapper = false; protected $cache = true; protected $cacheExpiry = 120; protected $draggable = false; public function getData() { $clients = new Clients(); $orders = new Orders(); $ticketCounts = localApi('GetTicketCounts', array()); return array( 'pendingOrders' => $orders->getPendingCount(), 'ticketsAwaitingReply' => $ticketCounts['awaitingReply'], 'cancellations' => $clients->getNumberOfOpenCancellationRequests(), 'moduleQueueCount' => ModuleQueue::incomplete()->count(), ); } public function generateOutput($data) { $pendingOrders = (int) $data['pendingOrders']; $awaitingReply = (int) $data['ticketsAwaitingReply']; $pendingCancellations = (int) $data['cancellations']; $moduleQueueCount = (int) $data['moduleQueueCount']; $overdueinvoices = Invoice::overdue()->count(); return <<<EOF <div class="row home-status-badge-row"> <div class="col-wsm-2"> <div class="health-status-block status-badge-green clearfix"> <div class="icon"> <a href="orders.php"> <i class="fas fa-shopping-cart"></i> </a> </div> <div class="detail"> <a href="orders.php?status=Pending"> <span class="count">{$pendingOrders}</span> <span class="desc">Pending Orders</span> </a> </div> </div> </div> <div class="col-wsm-2"> <div class="health-status-block status-badge-pink clearfix"> <div class="icon"> <a href="supporttickets.php"> <i class="fas fa-comment"></i> </a> </div> <div class="detail"> <a href="supporttickets.php"> <span class="count">{$awaitingReply}</span> <span class="desc">Tickets Waiting</span> </a> </div> </div> </div> <div class="col-wsm-2"> <div class="health-status-block status-badge-orange clearfix"> <div class="icon"> <a href="cancelrequests.php"> <i class="fas fa-ban"></i> </a> </div> <div class="detail"> <a href="cancelrequests.php"> <span class="count">{$pendingCancellations}</span> <span class="desc">Pending Cancellations</span> </a> </div> </div> </div> <div class="col-wsm-2"> <div class="health-status-block status-badge-cyan clearfix"> <div class="icon"> <a href="modulequeue.php"> <i class="fas fa-exclamation-triangle"></i> </a> </div> <div class="detail"> <a href="modulequeue.php"> <span class="count">{$moduleQueueCount}</span> <span class="desc">Pending Module Actions</span> </a> </div> </div> </div> <div class="col-wsm-2"> <div class="health-status-block status-badge-red clearfix"> <div class="icon"> <a href="invoices.php?status=Overdue"> <i class="fas fa-sack-dollar"></i> </a> </div> <div class="detail"> <a href="invoices.php?status=Overdue"> <span class="count">{$overdueinvoices}</span> <span class="desc">Overdue Invoices</span> </a> </div> </div> </div> </div> EOF; } } .col-wsm-2 { width: 20%; float: left; padding: 0 5px; } .status-badge-red { background-color: #ff0000; } .status-badge-red .icon { background-color: #e40707; } .health-status-block .detail { float: left; display: inline-block; padding: 8px 15px; width: 79%; height: 70px; border-radius: 0 4px 4px 0; text-align: center; } .health-status-block .icon { float: left; display: inline-block; width: 20%; height: 70px; font-size: 2em; line-height: 70px; text-align: center; border-radius: 4px 0 0 4px; } But I will also revert back to badges,.php and remove the pending module action as it is duplicated in the system health widget and use that location for the overdue invoice. So no css changes will be needed. With the above this is how it looks at this time.
  3. Brian, you are awesome, many many thanks. The only change was i replace col-sm-2 to a custom class and set width to 20% Once again thanks Brian
  4. Hello For me it was the smartermail server add on modules/servers/smartermail/smartermail.php edit this file and locate all lines with getTemplateVars() and comment it out as they do not work anyways since the smartermail code is very dated and there has not been any update for years. Doing this while the smartermail function will not work, but this is ok, at least the whmcs functions and it will eliminate the errors. Brian
  5. Hello I am having an issue in the client area, when users select a smartermail service, they get Something went wrong and we couldn't process your request. with this info Error: Call to a member function getTemplateVars() on null in /var/www/vhosts/billing.wsigenesis.com/whmcsdata/templates_c/6168120062068525cbc19f8fd94a9d6e8c6ab6ae_0.file.clientarea.tpl.php:25 Stack trace: 0 /var/www/vhosts/billing.wsigenesis.com/httpdocs/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5ff3743078b550_78353019() 1 /var/www/vhosts/billing.wsigenesis.com/httpdocs/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode() 2 /var/www/vhosts/billing.wsigenesis.com/httpdocs/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render() 3 /var/www/vhosts/billing.wsigenesis.com/httpdocs/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render() 4 /var/www/vhosts/billing.wsigenesis.com/httpdocs/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute() 5 /var/www/vhosts/billing.wsigenesis.com/httpdocs/vendor/whmcs/whmcs-foundation/lib/Smarty.php(0): Smarty_Internal_TemplateBase->fetch() 6 /var/www/vhosts/billing.wsigenesis.com/httpdocs/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): WHMCS\Smarty->fetch() 7 /var/www/vhosts/billing.wsigenesis.com/httpdocs/clientarea.php(0): WHMCS\ClientArea->getSingleTPLOutput() WHMCS advise::: I have discovered a solution: you can allow the template object in Smarty Security policy as mentioned here: https://docs.whmcs.com/Smarty_Security_Policy#Supported_Policy_Settings_and_Values Here is an example of a working policy and template snippet using the $template object instead of getTemplateVars() that demonstrates this // minimum policy inside configuration.php $smarty_security_policy = array( 'system' => array( 'disabled_tags' => [], 'enabled_special_smarty_vars' => array( 'template_object', ), ), ); <!-- in the page's template --> {php} echo 'PHP Block: '; echo $template->tpl_vars['template']; echo "<br/>"; {/php} Template Variable: {$template}<br/> I trust that gives you a good starting point for your customisations. Does any one know where to add the above Thanks Brian
  6. Hello All, I have a situation, where if a client by any means has credits and uses this credit to pay for an order. It can be many years later, if the client terminates this order and the order is cancel. WHMCS will automatically refund the client the payment on the very first invoice. As I have a number of clients that funds their account and this fund appears as credits and is used to pay for new orders and or outstanding invoices. My issue is when this order is cancel the first invoice is refunded. NOTE: cancel order not cancel & refund. Now whmcs advised only to terminate the order and leave it in the system, the issue is some client wants their data deleted and hence the order must be deleted and hence the issue. Now if the order was paid by credit card and is terminated and deleted - this issue does not happen. It only happens if a) one fund their account b) order a new service and pay for it using the credit - as you can see clients that is aware of this issue can abuse it. As in many cases I have to delete the order, if you know of a way that can prevent a deleted order from automatically and there are 2 cancel buttons, I would expect cancel to not issue any refunds, while cancel and refund button will issue refunds. Thanks Brian
  7. Hello All, As whmcs removed the toolbar from v8, and thanks to Brian's hook I am able to adjust it and add back overdue invoices to just the admin home page. In the image attached, you will see it above the panel badges (by default the 4 whmcs provided badges). I am able to adjust the css to add a 5th panel badge as the image will show. Question does any knows how I can hook into the panel badges, as whmcs support does not have an answer. All I want to do is a) from the image remove Brian's modified hook, and hook into the panel badge as display total overdue invoices. Thanks in advance. Brian
  • 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