Jump to content

brian!

GearHead
  • Content count

    10,330
  • Joined

  • Last visited

  • Days Won

    275

brian! last won the day on March 21

brian! had the most liked content!

Community Reputation

1,865 Excellent

About brian!

  • Rank
    WHMCS GearHead

Recent Profile Visitors

22,602 profile views
  1. usually, the admin dashboard widgets contains permissions of who is allowed to view them... https://docs.whmcs.com/Admin_Dashboard#Showing.2FHiding_Widgets as you can see from the above list, "Client Activity" requires the admin role to have "List Clients" enabled in their role in order to see the widget - if it is unticked, then they will not see this widget. so if this admin role doesn't need to see the list of clients, then keeping this option unticked in their admin role settings is the simplest solution... if they do need to see the list of clients, then you could modify the widget code and choose another permission that is ticked for your "Full Administrator" role, but is unticked for the roles that you want to hide the widget from - it wouldn't really matter which permission you choose. the "Staff Online" widget doesn't contain any permission restrictions, so all admins will see it - however, as with the "Client Activity", if you modify the widget code (/modules/widgets/Staff.php) and assign it a permission, e.g "List Clients", then only those admin roles with that permission ticked will see the widget... protected $requiredPermission = 'List Clients'; though a default widget which has modified code would probably get replaced by the Automatic Updater - you may rename the file to avoid the file being overwritten, but the updater would probably restore the original file anyway. there is another problem with Staff Online in that the list of online admins is shown in the sidebar - to remove that, you would either have to edit the sidebar.tpl template (which again would get replaced by the automatic updater), or null the array used using a AdminAreaPage action hook, which would null it conditionally based on the role of the admin.
  2. brian!

    WHMCS 7.7.2 Release

    all versions of WHMCS have bugs (if that wasn't the case, the changelogs would be new features and not fixes) - and with each new release, there are some old bugs fixed, new bugs introduced... and a fair few bugs that always seem to get overlooked... twas always this way. 🙄 as Chris said, WHMCS don't signpost when releases are coming... FWIW, my opinion is that you won't see anything until May at the earliest... and if the next release is v7.8 or v8, then there'll be a beta period before any full release. they've announced plans to have 3 major releases this year, v7.7 was the first of them, so whether there is a plan to have a v7.7.2 maintenance release or go straight to v7.8, I don't know.... possibly they don't know themselves yet, and in many ways, it doesn't really matter which it is.
  3. brian!

    Get logged in user name and email address

    Hi Hayden, I would have thought you should be able to do this... <script type="text/javascript" src="https://cdn.natterly.com/chatbox.js"></script> <script> chatbox = new NatterlyChatbox("[My licence goes here]"); chatbox.visitor.name = '{$clientsdetails.fullname}'; chatbox.visitor.emailAddress = '{$clientsdetails.email}'; chatbox.render(); </script> if the client isn't logged in, then both values should be empty.
  4. brian!

    Data Feed & replacement possible ?

    Hi Christian, yes, but you're thinking of it entirely the wrong way. that's simple enough. then it's time for you to leave your stupid world and enter my insane world! the solution is that instead of letting the data feed return the default price, e.g €100 EUR, and then trying to translate/manipulate/edit the result, you modify the feed code to suit your needs and return what you want from it! now, you should never modify existing data feeds because they will be overwritten by the WHMCS automatic updater - so create a new data feed in the feeds folder, post your code in there, modify it and use that... to save you time, i've quickly updated the productsinfo feed you mentioned and i've attached it to this post... just rename it to something else and remember to change your references (filename, productid, billingcycle, currency etc) in your template code that calls the feed(s). I have added 3 options - to either output the price with a suffix; with a prefix, or with neither... full string = <script language="javascript" src="feeds/productsinfo.php?pid=1&get=price&billingcycle=annually&currency=1"></script><br> suffixed = <script language="javascript" src="feeds/productsinfo.php?pid=1&get=price&billingcycle=annually&currency=1&output=suffix"></script><br> prefixed = <script language="javascript" src="feeds/productsinfo.php?pid=1&get=price&billingcycle=annually&currency=1&output=prefix"></script><br> price only = <script language="javascript" src="feeds/productsinfo.php?pid=1&get=price&billingcycle=annually&currency=1&output=number"></script><br> full string = £100.00 GBP suffixed = 100.00 GBP prefixed = £100.00 price only = 100.00 productsinfo.php
  5. brian!

    Gocardless and domain name renewals

    I appreciate that - i'm loathed to use any module, whether written by WHMCS or a third-party unless absolutely necessary. the reason I mentioned that addon was because it has been praised by a few users whose opinion I respect.. e.g now of course, evidence of good support today doesn't mean they will do the same tomorrow - but there are risks with relying on WHMCS too! implied from John's reply in the above thread, I would take the answer to be yes. if you syncing, then modifying the due dates manually is sadly not really an option. if it did, it wouldn't be syncing, just adjusting! 🙂 shall I post an obligatory 5-year old feature request (are there any other types!) - it might be worth a read as there a few applicable hooks posted in the thread that you might be able to modify for your purpose... though it comes to something when users realise that it's quicker/better to post solutions themselves rather than wait for WHMCS to complete the request! 🙄 with the best will in the world, and even with Chris passing it up the food chain, I can't see them hotfixing this imminently and I suspect it's going to be a couple of months before the next release - so nothing will change before then... and possibly not even then.
  6. then the $domainoption value in the hook will be "owndomain" rather than "transfer"...
  7. it's configureproductdomain.tpl and you will just need to adjust the order of the {if} statements... the thread below deals with the Modern template, but the principle remains true for standard_cart too. depending on your sort order, you may also need a ClientAreaPageCart hook to set the value of $domainoption to your default choice to open - i've posted that hook previously, but if the wrong option is opening by default for you after the change, you can use the following hook to change it. <?php # Configure Default Domain Option in Configureproductdomain Hook # Written by brian! add_hook("ClientAreaPageCart",1,function($vars){ if ($vars['templatefile']=="configureproductdomain") { return array("domainoption" => "transfer"); } }); e.g the above hook would make the transfer option open by default for all products... obviously, you could expand the hook to default to different options for different products, and i've posted on that previously.
  8. brian!

    Avoiding PHP Smarty

    I think it has to be called hooks.php - but there's nothing to stop you encoding it to protect your code.
  9. brian!

    Avoiding PHP Smarty

    yes - either do it in PHP (e.g hooks) or Smarty in the templates... never using {php} in the templates.
  10. if it isn't there by default, then it would be a ClientAreaPage hook (IIRC Cart hook isn't triggered by the renewals page); you would get the $renewalsData array from the template; loop through the array; add the registrar name to each domain in the array and then return the array to the template.
  11. brian!

    Gocardless and domain name renewals

    then the short-term fix would be to disable the "Auto Renew on Payment" option in general settings -> domains; optionally renew the domain directly at the registrar and with payment renewal disabled, WHMCS will just create a to-do item and not try to renew again... that said, having their domains expire and their sites go down can often be a remarkable encouragement for clients to pay their invoices earlier in the future! I suspect it's how it's supposed to work... your problem is that direct debits aren't instant, and WHMCS will attempt the charge on the invoice due date... therefore, you may have to adjust how WHMCS handles domains, and possibly hosting, renewals to account for the delay in receiving payment. so one option might be to manually change the due dates forward of these domains that use the GC module... I know that the Nifty GoCardless module gives you the option of charging x days before the due date, but i'm not sure if the WHMCS GoCardless module can do the same.
  12. probably /templates/orderforms/boxes/products.tpl going by that screenshot... but you'd likely have to change every template in the boxes folder that uses this icon (adddomain, the three configure templates, viewcart and domainrenewals) another option would be to use css to remove the icon (e.g in custom.css)... i.fas.fa-arrow-circle-right {display: none !important;} it should work, but because there is a hardcoded space in the output, the "Continue" will appear to be off-centre... so in this instance, it might be easier to edit the template as Kian suggests. you could even change the icon using css - though I don't know if this would work in your case... i.fas.fa-arrow-circle-right:before {content: "\f061";}
  13. do you mean the Staff Online or the Client Activity widget ??
  14. brian!

    Conditional language overrides

    where exactly are you trying to do this? the language string 'invoicenumber' isn't used in the invoice templates (pdf or html) by default, though is used at the complete stage after ordering. you'd be able to access the $clientsdetails array (either at complete or when they're viewing an invoice) and that will contain their tax exempt status (1 for yes, 0 for no) and that could be used for your conditional, e.g if 1, then you strip 'Tax ' from the string, or use a different string entirely... that could be achieved in the templates or using a hook. altering the filename could be trickier and would certainly require a hook, but does the actual filename matter for tax purposes ?
  15. brian!

    Product dependent product logic

    require in the strictest sense, not really... one in-built solution would be to use Product Bundles. now if they chose to, the user could remove one of the products from the cart before checkout - so that's why I said the second product isn't REQUIRED because it can be removed (though I suppose you could price the bundle to encourage them not to remove it). Configurable Options might be another option, but it really depends what configuration this secondary product might need. if you need a commercial alternative, ModulesGarden's Product Linker might be a viable option...
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines