Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Hi, did you work this out I am trying to do something a little similar, I have the SQL i need to get the price from value for a group of products in a particular currency but I cant seem to output the data. I am putting this in the php of a custom page $pdo = Capsule::connection()->getPdo(); try { $statement = $pdo->prepare( 'SELECT MIN(tp.monthly) AS minprice FROM tblproducts p, tblpricing tp WHERE p.hidden=0 AND p.id = tp.relid AND p.gid = 29 AND tp.currency=1;' ); $statement->execute(); $result = $statement->fetch(); } catch (\Exception $e) { echo "Ooooooooops {$e->getMessage()}"; } print_r($result); But my result does not match the result if I run the same SQL directly in mysql Array ( [minprice] => [0] => ) Any ideas? What am I doing wriong
  3. Netguy

    Domain Related Queries

    @brian! Thanks! For number 1, can you tell me the syntax of pricing override hooks? For number 2, by disabling Require Domain - will I be able to compulsorily show a sub-domain? For number 3, thank you!
  4. Today
  5. EvolveWebHosting

    Removing Unused Addon Module

    I decided to re assign those expired products to the replacement module and then I deleted the files and DB tables for the module no longer used. Seems to be working without any issues.
  6. I'd like to remove an addon module that is already de activated and still has a couple of expired products assigned to it. Can I just delete the files or should I delete the expired services first and then delete the module files?
  7. Welcome to WHMCS.Community RT735! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  8. rgazetta

    Show Tickets Admin

    Is there any way to modify it so that tickets are displayed to the operator separated by department and priority in a way without having to keep using the filter at all times?
  9. Welcome to WHMCS.Community Bogdandcv! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  10. brian!

    Domain Related Queries

    do you mean ourpride.co.uk costs £10 with product A, but £8 with product B ? promotion codes, product bundles or coding with pricing override hooks would be your main options. untick the Require Domain checkbox in the particular product setup. https://docs.whmcs.com/Products_and_Services https://docs.whmcs.com/Additional_Domain_Fields
  11. brian!

    Disable Affiliate for domain names

    WHMCS should do that by default already. 🙂 https://docs.whmcs.com/Affiliates
  12. brian!

    Domain Renewal URL path incorrect

    take a look at the thread below and see if it helps.
  13. brian!

    Changing the admin theme

    we got there in the end. 🙂 btw, this isn't important, but you could probably trim those uses at the start to just the 3 below - everything else you are seemingly no longer using... use WHMCS\Module\AbstractWidget; use WHMCS\User\Client; use WHMCS\Billing\Invoice; .. or could you leave them in for future use, e.g if you're planning on having more than 4 badges any time soon.
  14. monsterit

    Changing the admin theme

    Great thank you. I've changed a part below too as it was clients, so changed that to count. 🙂 <?php add_hook('AdminHomeWidgets', 1, function() { return new InvoicesWidget(); }); use WHMCS\Carbon; use WHMCS\Clients; use WHMCS\Module\AbstractWidget; use WHMCS\Module\Queue as ModuleQueue; use WHMCS\Orders; use WHMCS\Billing\Invoice; use WHMCS\User\Client; /** * Badges Widget. * * @copyright Copyright (c) WHMCS Limited 2005-2018 * @license https://www.whmcs.com/license/ WHMCS Eula */ class InvoicesWidget extends \WHMCS\Module\AbstractWidget { protected $title = "Invoices Widget"; protected $description = 'Invoices'; protected $columns = 3; protected $weight = 0; protected $wrapper = false; protected $cache = false; protected $cacheExpiry = 120; protected $draggable = false; public function getData() { $incomeStats = getAdminHomeStats('income'); foreach ($incomeStats['income'] as $key => $value) { $incomeStats['income'][$key] = $value->toPrefixed(); } return array( 'activeCount' => Client::where('status', '=', 'Active')->count('id'), 'unpaidInvoices' => Invoice::unpaid()->count('id'), 'overdueInvoices' => Invoice::overdue()->count('id'), 'incomestats' => $incomeStats, ); } public function generateOutput($data) { $activeCount = (int) $data['activeCount']; $unpaidInvoices = (int) $data['unpaidInvoices']; $overdueInvoices = (int) $data['overdueInvoices']; $incomeThisMonth = $data['incomestats']['income']['thismonth']; return <<<EOF <div class="row home-status-badge-row"> <div class="col-sm-3"> <div class="health-status-block status-badge-red clearfix"> <div class="icon"> <a href="clients.php?status=Active"> <i class="fas fa-user-friends"></i> </a> </div> <div class="detail"> <a href="clients.php?status=Active"> <span class="count">{$activeCount}</span> <span class="desc">Active Clients</span> </a> </div> </div> </div> <div class="col-sm-3"> <div class="health-status-block status-badge-purple clearfix"> <div class="icon"> <a href="invoices.php"> <i class="fas fa-file-invoice-dollar"></i> </a> </div> <div class="detail"> <a href="invoices.php?status=Unpaid"> <span class="count">{$unpaidInvoices}</span> <span class="desc">Unpaid Invoices</span> </a> </div> </div> </div> <div class="col-sm-3"> <div class="health-status-block status-badge-teal clearfix"> <div class="icon"> <a href="invoices.php"> <i class="fas fa-business-time"></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 class="col-sm-3"> <div class="health-status-block status-badge-gold clearfix"> <div class="icon"> <a href="modulequeue.php"> <i class="fas fa-wallet"></i> </a> </div> <div class="detail"> <a href="modulequeue.php"> <span class="count">{$incomeThisMonth}</span> <span class="desc">Income This Month</span> </a> </div> </div> </div> </div> EOF; } } all working perfectly. Thank you once again.
  15. brian!

    Changing the admin theme

    I don't like that getData has two returns - the widget will only see the first (the one taken from the billing widget code) and ignore the second (hence your output). btw, some of the queries can be improved too... public function getData() { $incomeStats = getAdminHomeStats('income'); foreach ($incomeStats['income'] as $key => $value) { $incomeStats['income'][$key] = $value->toPrefixed(); } return array( 'activeCount' => Client::where('status', '=', 'Active')->count('id'), 'unpaidInvoices' => Invoice::unpaid()->count('id'), 'overdueInvoices' => Invoice::overdue()->count('id'), 'incomestats' => $incomeStats, ); } public function generateOutput($data) { $activeCount = (int) $data['activeCount']; $unpaidInvoices = (int) $data['unpaidInvoices']; $overdueInvoices = (int) $data['overdueInvoices']; $incomeThisMonth = $data['incomestats']['income']['thismonth'];
  16. Welcome to WHMCS.Community JeremyNearf! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  17. monsterit

    Changing the admin theme

    Sorry ignore the above one. i've managed to put alot in but for some reason it's only showing one module counting and i cannot put my finger on it. see the image below. Heres my very long winded coding section. (complete). <?php add_hook('AdminHomeWidgets', 1, function() { return new InvoicesWidget(); }); use WHMCS\Carbon; use WHMCS\Clients; use WHMCS\Module\AbstractWidget; use WHMCS\Module\Queue as ModuleQueue; use WHMCS\Orders; use WHMCS\Billing\Invoice; use WHMCS\User\Client; /** * Badges Widget. * * @copyright Copyright (c) WHMCS Limited 2005-2018 * @license https://www.whmcs.com/license/ WHMCS Eula */ class InvoicesWidget extends \WHMCS\Module\AbstractWidget { protected $title = "Invoices Widget"; protected $description = 'Invoices'; 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(); $incomeStats = getAdminHomeStats('income'); foreach ($incomeStats['income'] as $key => $value) { $incomeStats['income'][$key] = $value->toPrefixed(); } return $incomeStats; return array( 'activeCount' => (int) Client::where('status', '=', 'Active')->count(), 'unpaidInvoices' => (int) Invoice::where('status', '=', 'Unpaid')->count(), 'overdueInvoices' => (int) Invoice::where('status', '=', 'Overdue')->count(), ); } public function generateOutput($data) { $activeClients = number_format((int) $data['activeCount']); $unpaidInvoices = (int) $data['unpaidInvoices']; $overdueInvoices = (int) $data['overdueInvoices']; $incomeThisMonth = $data['income']['thismonth']; return <<<EOF <div class="row home-status-badge-row"> <div class="col-sm-3"> <div class="health-status-block status-badge-green clearfix"> <div class="icon"> <a href="clients.php?status=Active"> <i class="fas fa-user-friends"></i> </a> </div> <div class="detail"> <a href="clients.php?status=Active"> <span class="count">{$activeClients}</span> <span class="desc">Active Clients</span> </a> </div> </div> </div> <div class="col-sm-3"> <div class="health-status-block status-badge-pink clearfix"> <div class="icon"> <a href="invoices.php"> <i class="fas fa-file-invoice-dollar"></i> </a> </div> <div class="detail"> <a href="invoices.php?status=Unpaid"> <span class="count">{$unpaidInvoices}</span> <span class="desc">Unpaid Invoices</span> </a> </div> </div> </div> <div class="col-sm-3"> <div class="health-status-block status-badge-orange clearfix"> <div class="icon"> <a href="invoices.php"> <i class="fas fa-business-time"></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 class="col-sm-3"> <div class="health-status-block status-badge-cyan clearfix"> <div class="icon"> <a href="modulequeue.php"> <i class="fas fa-wallet"></i> </a> </div> <div class="detail"> <a href="modulequeue.php"> <span class="count">{$incomeThisMonth}</span> <span class="desc">Income This Month</span> </a> </div> </div> </div> </div> EOF; } }
  18. Iterate over your array and perform AddClient.
  19. Hi Chris,

              Can you please look into why usage metrics is not working for 3rd party provisioning module developers or please ask your team to help as soon as possible.I've sent a ticket to WHMCS support but according to them they do not cater tickets related to 3rd party module development so can you please get us into speed as usage metrics is very important for my employer and we're soon heading towards a product launch so time is ticking for us, any kind of help regarding solving this issue will be highly appreciated!

    P.S. Syntax is not the issue here(just so you know)

  20. Might be hard to do, but you could try and convert all your data in Excel to SQL in the format that WHMCS uses. Alternatively, you could code something to use the WHMCS API.
  21. Just had someone mention that the domain renewal link is incorrect but I am struggling to find where to change this. It seems the link is adding the full root path e.g https://dashboard.mydomain.com/accountname/dashboard.mydomain.com/index.php?rp=/domain/somedomain.co.uk/renew Accountname is the cPanel account WHMCS is installed under, that should not be there. Any suggestions?
  22. It seems that Nginx isn't sending the request to the whois.php file.
  23. zitu4life

    Pro Rata Bill

    Start here https://docs.whmcs.com/Products_and_Services#Products
  24. Ragonz

    Gocardless

    We have just switched this on to give it a try following the update to 7.9, testing shows that when a customer would order it all goes through fine but a direct debit can take up to 10 working days to go through. Customers are not going to want to wait up to 10 working days to get access to their service. Is there a way to say if paying via method x set it up even if payment has not been recieved? or should we scrap this payment method
  25. monsterit

    Changing the admin theme

    This is my whole output. <?php add_hook('AdminHomeWidgets', 1, function() { return new InvoicesWidget(); }); 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 InvoicesWidget extends \WHMCS\Module\AbstractWidget { protected $title = "Invoices Widget"; protected $description = 'Invoices'; 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(); return array( 'pendingOrders' => $orders->getPendingCount(), 'unpaidInvoices' => (int) Invoice::where('status', '=', 'Unpaid')->count(), 'overdueInvoices' => (int) Invoice::where('status', '=', 'Overdue')->count(), 'moduleQueueCount' => ModuleQueue::incomplete()->count(), ); } public function generateOutput($data) { $pendingOrders = (int) $data['pendingOrders']; $unpaidInvoices = (int) $data['unpaidInvoices']; $overdueInvoices = (int) $data['overdueInvoices']; $moduleQueueCount = (int) $data['moduleQueueCount']; return <<<EOF <div class="row home-status-badge-row"> <div class="col-sm-3"> <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">Active Clients</span> </a> </div> </div> </div> <div class="col-sm-3"> <div class="health-status-block status-badge-pink clearfix"> <div class="icon"> <a href="invoices.php"> <i class="fas fa-file-invoice-dollar"></i> </a> </div> <div class="detail"> <a href="invoices.php?status=Unpaid"> <span class="count">{$unpaidInvoices}</span> <span class="desc">Unpaid Invoices</span> </a> </div> </div> </div> <div class="col-sm-3"> <div class="health-status-block status-badge-orange clearfix"> <div class="icon"> <a href="invoices.php"> <i class="fas fa-business-time"></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 class="col-sm-3"> <div class="health-status-block status-badge-cyan clearfix"> <div class="icon"> <a href="modulequeue.php"> <i class="fas fa-ban"></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> EOF; } } I can see unpaid invoices now but no over invoices. above is the code and below is my screen shot.
  26. monsterit

    Changing the admin theme

    im editing the badges-new.php but struggling with it. tbh.everytime i edit it i loose everything.
  27. Welcome to WHMCS.Community Edwardbop! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  1. Load more activity
×

Important Information

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