Jump to content


Honored Contributor
  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by brian!

  1. 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
  2. brian!

    Disable Affiliate for domain names

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

    Domain Renewal URL path incorrect

    take a look at the thread below and see if it helps.
  4. 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.
  5. 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'];
  6. brian!

    I propose a tax-free world

    don't be shy - i'm volunteering you (and your coding colleagues) for a week or two in Houston - all expenses paid by WHMCS. ✈️
  7. brian!

    Changing the admin theme

    I assume you know there are a few lines at the end missing from the above post.... i'm assuming that's just an issue with your copy&paste and not the original file. 🙂 also, have you renamed the file yet, or are you still editing the original badges.php ??
  8. perhaps it doesn't like the double caret that somehow appeared in the pasted code... <span class="pull-left">&nbsp;&raquo; {if $configoption.name|strstr:'('}{$configoption.name|strstr:'(':true}{else}{$configoption.name}{/if}: {$configoption.optionname}</span>
  9. not from the settings - though it could be acheived using an action hook.
  10. brian!

    Creating a new report

    check your PM for the mySQL query for that. 🙂 it shouldn't be difficult to add a country filter to the transactions report that would allow you to specify a 2-letter country code to search for, e.g GB, US etc.
  11. brian!

    display domain checker on custom page

    on the original default page, yes - on a custom page, they probably won't exist.... some arrays/variables are available in all pages (including custom); arrays that are available to a specific existing page, will not be available to a custom page. I should mention first that there is already a separate domain pricing page available in WHMCS - you should just need to go to yourdomain.com/domain/pricing/ (the url might change depending on your friendly URLs settings)... even if you could copy the Smarty code from the existing template (either above or domain register), to do the same on a custom page would require at least 2 arrays to be recreated using action hooks - you would probably need to play with the CSS too. there's a domain pricing table data feed, but you would need to add css or rewrite the code to make it look like the default domain pricing table.
  12. brian!

    check page using $template

    what do you want to do exactly ??
  13. brian!

    How to expand admin widget with css

    I don't see why not - the existing widget will just be querying the project management database tables, the same as any other widget does.
  14. brian!

    display domain checker on custom page

    always assume that there are... unless you find otherwise. 🙂 for example, you can't copy the code from the invoices template and expect it to work on a custom page - it won't - because the invoices template is passed arrays of data to output and a custom page won't have those arrays. we all were once.
  15. brian!

    Creating a new report

    do you need a detailed list of the transactions or just the totals for each year (and the grand total)? the usual 3 solutions are to either... find an existing report that is similar to what you want and modify it for your needs. use a MySQL query directly in phpmyadmin or similar. write a WHMCS report from scratch. ultimately, all you're doing is joining tblclients to tblaccounts, specifying only GB results and then it's just a case of working out what values you need in the results.
  16. I suppose it's worth stating that they don't have to use the same image file. the email logo is specified in setup -> general settings -> Logo URL - the simplest solution to that will either be to resize the image, or define a size in the CSS (i'm assuming that the image is actually large and not having it resized by css). for the PDF, the simplest way is often to open placeholder.png in an image program (ideally one that uses layers) and then to add your image on top of it in a new layer, align it correctly, remove the placeholder layer and then save the png as logo.png - though whether that is practical depends on your logo and whether its dimensions are more landscape than portrait. the point to remember about the PDF logo is that its size is defined in the template in millimetres not px (think print, not web) - so if your image is a different shape/size than placeholder, then you might also need to edit the template and adjust the size and position of the logo too... difficult to advise without knowing the logo.
  17. brian!

    I propose a tax-free world

    I suspect there probably is a book too. 😮 i've said for years that they should get you directly involved to sort the mess out... at least to get the basic structure correct going forward in v8.
  18. with the only POV that matters being that of the tax authority. I think the OP just wants to hide them from the client area, as opposed to deleting them from the database. if you mean the entire Support dropdown... ,.. then it's exactly the same IF statement you used in the hook to remove Announcements from the navbar, but just copy it and change 'Announcements' to ''Support' and that will remove that dropdown... additionally, you might need to do the same for Open Ticket too if you don't want them to use that.
  19. brian!

    Changing the admin theme

    do you mean the language string, or the db query to get the actual value ? if it's the database query to get the unpaid invoices count, then it should need... use WHMCS\Billing\Invoice; and the pendingorders value is calculated using... 'pendingOrders' => (int) Invoice::where('status', '=', 'Unpaid')->count(), yeah, forget that i'm still calling the variable pendingorders when it's really calculating the count of unpaid invoices - i'm being lazy because as I mentioned in that other thread, it would have meant replacing all occurrences of pendingorders in the code - but you can do that if it makes it clearer. ... and don't forget not to edit the original badges.php file as that will just get overwritten during an update.
  20. hence why I wasn't getting involved with writing it! 🙂
  21. brian!

    display domain checker on custom page

    get rid of that IF statement and the closing {if} statement - those conditions will never be met on a custom page, so that's why the form won't show. on a general point, you often (nearly always!) can't copy&paste code from one template into another and expect it to work. the code in the thread below will work - it's just needs CSS applying to it to suit your site... it's basically the code from the Integration Code in Utilities... https://docs.whmcs.com/Linking_to_WHMCS#Integrating_a_Domain_Availability_Check_into_your_Website or another way would be to use the domainchecker data feed.
  22. as with many of these things, it would require a jQuery hook - if the admin pages used more templates, it would make changes like this so much easier. there would be a non-programming way to do something similar. e.g no hooks, no css, no template tweaks... just by using what's already in WHMCS. 🙂 as you may know, an invoice can have a custom number- so by default, it uses the invoice ID number (1,2,3 etc), but if you add a custom invoice number, it will use that... this feature could be hijacked for your purpose as visibly marking them "On Hold". it's not as visually clear as your tag idea, but it would do the same job. when you want to move it from being marked as "On Hold", just delete the custom ID number. if you ever sent an invoice to a client when this change had been made, it would show the "On Hold" on their invoice number - but they already know that it's on hold anyway, so that shouldn't be an issue. it will also show as being "On Hold" in the client area, but it would be simple enough to remove it from the client templates if this becomes an issue.
  23. brian!

    Changing the admin theme

    they're generated by the Badges widget in /modules/widgets - it's not encrypted, so you will be able to edit it to tweak the output.
  24. to add a button on the left of each item on that page would be a jQuery hook (same would apply to appending the item content with the ID#) - kian is on a roll today with them, so I can leave that to him if you want to go down that path. unless i'm missing something, you're almost certainly going to have to query the database to get the service/domain ID for each invoice item. AdminInvoicesControlsOutput would be an alternative hook if you want to avoid using jQuery, but it would place the custom output below the buttons (top right) on the invoice page.
  25. a screenshot might be helpful here as to where you are talking about.... i'm unsure which page you're referring to! 😕

Important Information

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