Jump to content


Popular Content

Showing content with the highest reputation since 08/08/19 in all areas

  1. 5 points
    I've seen there's a feature request submitted 7 years ago about bulk auto recalculate. I know you can do that from phpMyAdmin or with a script but enough is enough. <? /** * Bulk Auto Recalculate Client Domain & Products/Services * * @writtenby Kian * */ use WHMCS\Database\Capsule; add_hook('AdminAreaHeaderOutput', 1, function($vars) { if ($vars['filename'] == 'clientssummary' AND $_GET['userid'] AND in_array($_GET['kata'], array('bulkAutoRecalculateP', 'bulkAutoRecalculateD'))) { $adminUsername = ''; // Optional for WHMCS 7.2 and later if ($_GET['kata'] == 'bulkAutoRecalculateP') { foreach(Capsule::table('tblhosting')->where('userid', '=', $_GET['userid'])->pluck('id') as $v) { localAPI('UpdateClientProduct', array('serviceid' => $v, 'autorecalc' => true), $adminUsername); } header('Location: clientssummary.php?userid=' . $_GET['userid']); die(); } elseif ($_GET['kata'] == 'bulkAutoRecalculateD') { foreach (Capsule::table('tbldomains')->where('userid', '=', $_GET['userid'])->pluck('id') as $v) { localAPI('UpdateClientDomain', array('domainid' => $v, 'autorecalc' => true), $adminUsername); } header('Location: clientssummary.php?userid=' . $_GET['userid']); die(); } } return <<<HTML <script> $(document).ready(function(){ $('[href*="affiliates.php?action=edit&id="], [href*="clientssummary.php?userid="][href*="&activateaffiliate=true&token="]').closest('li').after(('<li><a href="#" id="kata_BulkAutoRecalculate"><i class="fas fa-fw fa-sliders-h" style="width:16px;text-align:center;"></i> Bulk Auto Recalculate</a></li>')); $('#kata_BulkAutoRecalculate').on('click', function(e){ e.preventDefault(); $('#modalAjaxTitle').html('Bulk Auto Recalculate'); $('#modalAjaxBody').html('<div class="container col-md-12"><div class="row"><div class="col-md-6 text-center"><div class="panel panel-default"><div class="panel-body"><p><i class="fas fa-box fa-5x"></i></p><p><small>Auto Recalculate Customer\'s <strong>Products/Services</strong></small></p><p><a href="clientssummary.php?userid={$_GET['userid']}&kata=bulkAutoRecalculateP" class="btn btn-info btn-block">Recalculate Now Β»</a></p></div></div></div><div class="col-md-6 text-center"><div class="panel panel-default"><div class="panel-body"><p><i class="fas fa-globe fa-5x"></i></p><p><small>Auto Recalculate Customer\'s <strong>Domains</strong></small></p><p><a href="clientssummary.php?userid={$_GET['userid']}&kata=bulkAutoRecalculateD" class="btn btn-info btn-block">Recalculate Now Β»</a></p></div></div></div></div></div>'); $('#modalAjax .modal-submit').addClass('hidden'); $('#modalAjaxLoader').hide(); $('#modalAjax .modal-dialog').addClass('modal-lg'); $('#modalAjax').modal('show'); }) }) </script> HTML; });
  2. 4 points
    Hi everyone! Since I spend most of my time during the day on the WHMCS admin dashboard, answering tickets, activating services, following up with stuff, etc. I wanted to keep eye strain to a minimum, so I recently created this CSS file to turn our admin area into a dark look and feel. ------- Today, I'd like to share with you steps to achieve that. The file is compatible with Blend theme of v7.9.2 of WHMCS, I haven't tested it on the other versions yet. The process is pretty simple and straightforward IF YOU HAVEN'T MADE ANY CUSTOMIZATIONS to your Blend theme already. So just download the attached file (blend-dark.zip) and extract it anywhere in your computer. Next, open the folder and then the "images" folder to locate the (logo-dark.psd) file to edit it by placing your own logo there. Then save it as "logo-dark.gif" replacing the already existing file. Now you should end up with a file tree like this ... blend |__ css | |__ admin-dark.css | | |__ images | |__ logo-dark.gif | |__ logo-dark.psd | |__ header.tpl Now back top and compress your "blend" folder ... Name it something memorable, like "blend-2222.zip" in this example. Next navigate to the "admin" folder inside your WHMCS installation, and open the "templates" folder (based on your customizations, the "admin" folder name may differ, so this here presumes the default setting). /path/to/whmcs/admin/templates/ Next make sure to ZIP and backup your current Blend theme folder (name it something like "blend-original.zip). Next, upload the "blend-2222.zip" you compressed earlier to the "templates" folder and unzip it, and you should be all set and ready! If you have any notes or additions, please feel free to add! Also, any mistakes or errors are unintentional, please feel free to share and highlight them. Wishing everyone a good day! - Mohamed
  3. 4 points
    $38.14 + 18% = $45 if the tax is inclusive, then the price already contains the tax... so if the price were $118, the tax would be $18 and the subtotal $100 https://docs.whmcs.com/Tax/VAT#Inclusive.2FExclusive_Tax Tax Amount = ( Item Price / ( 100 + Tax Rate ) ) x Tax Rate Tax Amount = ( 45 / ( 100 + 18 ) ) x 18 = 6.86
  4. 3 points
    Some people want to show their client's credit balance when they login to client area, as the option not implemented by default in Six Template here is how to do it: 1) Upload the PHP file from Attachements to -> /WHMCS-Path/includes/hooks/ directory. WHMCS_SixTemplateCreditBalance.zip
  5. 3 points
    For v8 I really would like WHMCS to separate the market connect files, that includes the languages and the module. Have it as a separated download or installation. MarketConnect is a very different customer target to the original WHMCS clients. I surely don't need uploading and upgrading all those extra files for something I have no interested on using. I also paid the non-branded version but I see that lately WHMCS keeps renaming more and more files to whmcs.ext, in particular CSS and JS on the frontend. Personally I think this defeats the remove the branding option license. Its undesired for most installations as bots and spammers constantly scan WHMCS installations. This is not going to protect against security but I don't think it's a great idea to expose the WHMCS name on every single file. It also looks sloppy from the developing naming side. In the past WHMCS used more generic names for files which was a better fit because naming something WHMCS.js does not really tell me anything about what that file does and its purpose either. Files should be named based on what they do. Changes like this require almost no effort on WHMCS part or their development team and it would at least improve something. WHMCS is getting huge and I seriously think there are so many redundant files and things that most people don't need. It's not about saving space, but just being more efficient. I don't need thousands of files living on a production server that I will never use.
  6. 3 points
    Hello @WHMCS Sachin Thanks for letting us be more open to share our ideas.πŸ˜„ Al WHMCS users like this software a lot, so even that we know that software belongs to WHMCS, we would like to have it with our branded name on it, so my suggestion is that app could import our company name (that already exists on WHMCS admin>Setup>General settings) And display that name on app somewhere, on top or not, it is up to WHMCS where would be more convenient during developing , my print suggestion bellow. PS: this option to show company name could be also optional, so this mean if a user do not want to see their company name there , he\she could go to app settings and disable it with tick on\off so every one will be happy. Personally I think having a possibility to see our company name on APP make, make us feel like ...this is our app too, also perhaps could be users that have several WHMCS installations, so when they switch from one to another they could know easily on what installation is πŸ‘Œ
  7. 3 points
    Following a question from @Mauwiks... natively in WHMCS, there is no way to do this - but with the help of the attached hook, it is possible - just upload the hook to /includes/hooks the hook currently includes EIGHT different parameter options - I can think of at least 4 more options that I could add, and may do so at a later date, but I think 8 is plenty to be going on with. πŸ™‚ note: the addon's ID value can be found when in the URL when you edit that product addon in the admin area - configaddons.php?action=manage&id=1 Linking to one specific product addon cart.php?gid=addons&id=1 Linking to Market Connect product addons by brand cart.php?gid=addons&id=codeguard cart.php?gid=addons&id=sitelock cart.php?gid=addons&id=spamexperts cart.php?gid=addons&id=ssl cart.php?gid=addons&id=weebly these addons are found by the hook searching whether specific terms are found at the START of the product addon descriptions, e.g Codeguard etc Linking to multiple product addons cart.php?gid=addons&multi[]=1&multi[]=32&multi[]=54 Linking to a predefined group of product addons cart.php?gid=addons&id=group1 $group1 is a predefined array of product addon IDs that you can edit in the hook.. $group1 = array(12,28,20); you could, in theory, have multiple groups (arrays of addon IDs) predefined in the hook, but it's currently only coded for 1 group - but it would be simple enough to change. if you pass a numeric addon ID value that doesn't exist for the particular client, then you'll get the no addons available error message... ... I did toy with the idea of showing all addons under those circumstances, but I decided against it for now - not least because it keeps the coding simplified! πŸ˜‰ if you pass an undefined non-numeric id, e.g cart.php?gid=addons&id=brian, then there is nothing for the hook to remove and it will show all addons as per normal. you can only use one parameter option in a URL - e.g., you can't use cart.php?gid=addons&id=43&multi[]=32 addons_mauwiks.php
  8. 3 points
    I think you've really overcomplicated this by using multiple hooks and the way you're using each of them - it can be simplified to something more clearer... in fact, it could be reduced far more than i'm going to post here as i'm trying to keep it understandable for all. to a certain extent, that bit is fine... i'd argue that removing the affiliates link for everyone, then wanting to add it back just for clients, is a little silly - just remove it for non-clients. i'm not sure that you have going from that screenshot. you have to be careful because just one character wrong and it won't necessarily throw an error, the hook just won't work. out of the box, I don't think that Lagom does anything kinky with the navbars (other than to split the primary / secondary locations) - using hooks on them should still work... and i'm speaking as someone who was generously given a Lagom developers license by a client. 😎 one way I would write that hook would be... <?php add_hook('ClientAreaPrimaryNavbar', 1, function($primaryNavbar) { $client = Menu::context('client'); # remove for all if (!is_null($primaryNavbar->getChild('Home'))) { $primaryNavbar->removeChild('Home'); } # remove for non-clients if (is_null($client) && !is_null($primaryNavbar->getChild('Store'))) { $primaryNavbar->removeChild('Store'); } if (is_null($client) && !is_null($primaryNavbar->getChild('Affiliates'))) { $primaryNavbar->removeChild('Affiliates'); } if (is_null($client) && !is_null($primaryNavbar->getChild('Knowledgebase'))) { $primaryNavbar->removeChild('Knowledgebase'); } if (is_null($client) && !is_null($primaryNavbar->getChild('Announcements'))) { $primaryNavbar->removeChild('Announcements'); } # add for non-clients if (is_null($client)) { $primaryNavbar->addChild('hosting')->setLabel(Lang::trans('Hosting'))->setOrder(11); if (!is_null($primaryNavbar->getChild('hosting'))) { $primaryNavbar->getChild('hosting')->addChild('sharedhosting')->setLabel(Lang::trans('Shared Hosting'))->setURI('cart.php?gid=1')->setOrder(1); $primaryNavbar->getChild('hosting')->addChild('wordpresshosting')->setLabel(Lang::trans('WordPress Hosting'))->setURI('cart.php?gid=34')->setOrder(2); } $primaryNavbar->addChild('ecommerce')->setLabel(Lang::trans('Ecommerce Hosting'))->setOrder(12); if (!is_null($primaryNavbar->getChild('ecommerce'))) { $primaryNavbar->getChild('ecommerce')->addChild('ecommerce1')->setLabel(Lang::trans('CS-Cart Hosting'))->setURI('cart.php?gid=36')->setOrder(1); $primaryNavbar->getChild('ecommerce')->addChild('ecommerce2')->setLabel(Lang::trans('Magento Hosting'))->setOrder(2); } $primaryNavbar->addChild('vps')->setLabel(Lang::trans('Virtual Private Servers'))->setOrder(13); if (!is_null($primaryNavbar->getChild('vps'))) { $primaryNavbar->getChild('vps')->addChild('vps1')->setLabel(Lang::trans('VPS Cloud Shared'))->setURI('cart.php?gid=33')->setOrder(1); $primaryNavbar->getChild('vps')->addChild('vps2')->setLabel(Lang::trans('VPS Cloud Dedicated'))->setURI('cart.php?gid=31')->setOrder(2); } $primaryNavbar->addChild('dedicated')->setLabel(Lang::trans('Dedicated Servers'))->setURI('cart.php?gid=14')->setOrder(14); $primaryNavbar->addChild('cscart')->setLabel(Lang::trans('CS-Cart'))->setOrder(15); if (!is_null($primaryNavbar->getChild('cscart'))) { $primaryNavbar->getChild('cscart')->addChild('cscartlicenses')->setLabel(Lang::trans('CS-Cart Licenses'))->setURI('cart.php?gid=2')->setOrder(1); $primaryNavbar->getChild('cscart')->addChild('cscarthosting')->setLabel(Lang::trans('CS-Cart Hosibg'))->setURI('cart.php?gid=36')->setOrder(2); } } # add for clients only if (!is_null($client)) { $primaryNavbar->addChild('kb')->setLabel(Lang::trans('knowledgebasetitle'))->setURI('knowledgebase.php')->setOrder(50); } }); possibly an oversight on your part, but the magento child doesn't contain a link. in terms of how to add menu items for logged in users, i've done that at the end of the above hook where i've added a kb link back in for clients only. if you mean Services/Domains/Billing/Support, and removing them entirely/individually, then you don't really need to check whether the user is logged in or not - the same as you don't need to (though I do in the above hook) check that the client is not logged in when removing the "Store" link... it doesn't matter because only non-clients see the store link, clients don't (at least out of the box)... as an aside, you could nuke them with about 4 lines of code if you had to - but there are only four elements to remove, so let's not be deploying weapons of mass destruction for something so small. ☒️ note this quick method works because these default navbar children have unique names - if you had a situation where a link exists in both logged non-logged navbars (home being the obvious example), and you wanted to change their links depending on client logged in status, then under those circumstances, you would check first whether they were logged in or not... but I think for your purpose, you won't have to. so if you wanted to remove the Services tab for logged in users... if (!is_null($primaryNavbar->getChild('Services'))) { $primaryNavbar->removeChild('Services'); } that works because it checks to see of the parent exists, and only if it does, does it try to remove it - so for a non-client, it wouldn't get past the if statement. for kb, see above; for affiliates, I solved the issue by only removing it for non-logged in users - for new menu items, see above (re: kb and how I added the non-logged in parents with their kids).
  9. 3 points
    Hi Mohamed, <?php function admin_custom_css_hook($vars) { $currenttemplate = $vars['template']; if ($currenttemplate == "blend" ) { $head_return = ''; $head_return = '<link href="templates/blend/css/admin-dark.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> $(document).ready(function() { $(\'.header .logo img\').attr(\'src\', \'templates/blend/images/logo-dark.gif\'); }) </script>'; return $head_return; } } add_hook("AdminAreaHeadOutput",1,"admin_custom_css_hook"); there was two bugs in the original hook - first, it was changing the logos on the marketconnect pages with your logo(!)... i've fixed that by being more accurate with the logo .css reference in the hook. the second bug is when you look at admin pages that appear to be in a subdirectory (due to Friendly URL settings), e.g the setup pages for notifications, security settings etc, the logo is broken - that's purely down to the path to the image being wrong... I suspect that would be fixed by either expanding the hook for those conditions or referencing the replacement image with a full URL rather than a relative path.
  10. 3 points
    why? are they going to have a survey or a vote on what to add ?? (even if they did, how many users would vote??) no - they will already know what's going to change, and the user base will either have to like it or lump it.
  11. 3 points
    then you take @baymax's query and change the where statement... UPDATE tblclients SET groupid='new-group-ID' WHERE email LIKE '%@hotmail.com';
  12. 3 points
    maybe this query if all 60 clients are in the same group currently. UPDATE tblclients SET groupid='new-group-ID' WHERE groupid='current-group-ID'; Replace the parts in green.
  13. 3 points
    You can try this hook: https://github.com/Jetserver/WHMCS-Reply-Above-This-Line
  14. 3 points
    then you wouldn't use this hook, you would instead use ClientAreaProductDetailsOutput hook and specify what output occurs with specific service(s). <?php add_hook('ClientAreaProductDetailsOutput', 1, function($service) { $serviceID = $service['service']->Id; if ($serviceID == '600') { $output .= '<div class="alert alert-success" role="alert"><div class="row"><div class="col-sm-1"><i class="fab fa-whmcs fa-3x"></i></div><div class="col-sm-11">Welcome to WHMCS!<br><small>buy the addon!</small></div></div></div>'; } if ($output) { return $output; } }); it's worth noting that the location of this specific hook output is determined by the Smarty template and not the hook itself - if you were displaying MarketConnect banners on that page, it would display below them. if you have an unpaid/overdue invoice, then there is a default alert shown at the top of the page... ... but that output is specified in the template itself and only triggered if/when hardcoded conditions are passed to the template. if you wanted to output your alert elsewhere on the page, you would be looking at either editing the template to define exactly where the output should be (you could still trigger it, and specify it's content, with a hook), or using another output hook, containing JS to specify the exact location of the output (though can be difficult depending on where you want to output).
  15. 3 points
    Pretty simple to treat it like a typical config file in a lot of software. custom.css.txt (with a note to rename it)
  16. 3 points
    I was just about to suggest the same thing. πŸ™‚
  17. 3 points
    One thing to note is that WHMCS will redirect from contact.php to submitticket.php (your specific department) if you select a ticket department under WHMCS admin > setup > general settings > mail > Presales Form Destination
  18. 3 points
    don't be shy - i'm volunteering you (and your coding colleagues) for a week or two in Houston - all expenses paid by WHMCS. ✈️
  19. 3 points
    if there is no functionality or automation needed, then i'd still stick with using the Email Registrar idea - but remember that this registrar module code isn't encrypted and therefore can be duplicated and modified. πŸ˜‰ to duplicate the registrar, all you should need to do is... copy the "email" folder in /modules/registrars - for the sake of argument, paste the duplicated folder and call it "brian" - still in /modules/registrars/ go into the duplicate folder, e.g brian, and rename email.php to brian.php - for consistency keep the folder and filenames the same (and just one word). edit the brian.php file and replace occurrences of "email_" with "brian_" (there should be 6)... these functions need to be unique, so if email registrar is active, and this duplicate is active, you will get errors - so you have to rename the functions. edit the Friendly name line of code to differentiate this from the default email registrar... "FriendlyName" => array("Type" => "System", "Value"=>"Email Notifications (Brian Registrar 1)"), ... so you know which registrar this is to be used with... optionally change the logo. repeat as necessary for other registrars. on the Domain Registrars page, you will now have 2 different email registrars... and in a client's domain profile, it will be available as an option... in your case, what I would probably suggest is that you don't use the original Email Registrar module if you are going to rename it (e.g give it the name of a registrar) because a WHMCS update would probably overwrite any changes that you make to the module - so just use the duplicates that you make and the updater shouldn't touch them.
  20. 3 points
    you might want to share what the solution was in case others read this thread in the future.
  21. 3 points
    I've expanded this hook a bit to also cover failed transfers and log everything it does to the activity log. <?php use WHMCS\Database\Capsule; add_hook('DomainTransferCompleted', 1, function($vars) { //This hook will complete to-do items for transfers when the transfer is completed. $toDoID = Capsule::table('tbltodolist') ->where('status', 'In Progress') ->where('title', 'Domain Pending Transfer') ->where('description', 'LIKE', '% ' . $vars['domain'] . '%') ->get(); //Loop through the ID's and set them as completed. foreach ($toDoID as $entry) { $command = 'UpdateToDoItem'; $postData = array( 'itemid' => $entry->id, 'adminid' => '1', //Update this ID to an admin ID 'status' => 'Completed', ); localAPI($command, $postData); logActivity('Clean-up To-do List: ID ' . $entry->id . ' has been set as complete as the transfer completed successfully - Domain ID: ' . $vars['domainid'] . ' - Domain: ' . $vars['domain']); } }); add_hook('DomainTransferFailed', 1, function($vars) { //This hook will update to-do items for ttransfer that fails. $toDoID = Capsule::table('tbltodolist') ->where('status', 'In Progress') ->where('title', 'Domain Pending Transfer') ->where('description', 'LIKE', '% ' . $vars['domain'] . '%') ->get(); foreach ($toDoID as $entry) { $description = Capsule::table('tbltodolist') ->where('id', $entry->id) ->value('description'); $command = 'UpdateToDoItem'; $postData = array( 'itemid' => $entry->id, 'adminid' => '1', //Update this ID to an admin ID 'status' => 'Incomplete', 'description' => '*FAILED* '.$description, ); localAPI($command, $postData); logActivity('Clean-up To-do List: ID ' . $entry->id . ' has been set as incomplete as the transfer has failed - Domain ID: ' . $vars['domainid'] . ' - Domain: ' . $vars['domain']); } });
  22. 3 points
    Hi all, We are planning a 7.8.3 maintenance update by the end of the month. Included, amongst the usual maintenance fixes, will be the few outstanding issues with the new Stripe Elements module and Pay Methods feature. We are potentially also looking to include module updates for gateway(s) who have published 3DSecureV2 implementation docs in the past few days.
  23. 3 points
    you could try the following hook, which redirects users who are not logged in from viewcart to checkout... <?php # ViewCart For Clients Only Hook # Written by brian! function viewcart_for_clients_only_hook($vars) { $client = Menu::context('client'); if (!$client && $vars['templatefile'] === 'viewcart' && $vars['checkout'] !== true) { header("Location: cart.php?a=checkout"); exit; } } add_hook("ClientAreaPageCart", 1, "viewcart_for_clients_only_hook"); logged in users, e.g clients, will still able to go to viewcart as normal.
  24. 3 points
    Hi, As I said many times, there's no need to use WordPress, Joomla, Drupal or any other CMS that comes to mind. It takes weeks to get a decent integration and keeping it functional is a never ending process with lot of cons that I'm not going to list now. On the other hand it takes few weeks more to expand WHMCS to the point that you no longer need to use any external software. It took me years and tens of integrations to realize this concept πŸ˜… but now I'm fine since I no longer need to put so much efforts in such a silly activity. There's no question that your page can be integrated in WHMCS and personally I wouldn't consider any other alternative. Using WHMCS in example.com rather than client.example.com makes absolutely no difference. Not to mention that getting rid of WordPress lets you to save time and money for a number of reasons. In conclusion using WordPress and WHMCS feels like using the abacus - that's my personal opinion.
  25. 3 points
    In all honesty, this should not even be a feature request at all. It should be standard!! And as far as I can see, the link to the feature request that you posted is over 4 years old. There is no point in bothering to vote at all if WHMCS doesn't care to add such an absolutely obvious feature that is part of every other billing system in the world except WHMCS.
  26. 3 points
    I ran into an issue with this hook today - it works fine on a product linked to cPanel, but with other products it shows a blank page. with the assistance of sentq, I was able to tweak it to work correctly. <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { $service = Menu::context('service'); $domain = $service->domain; $servertype = $service->product->servertype; # Not cPanel, no links added if ($servertype!="cpanel"){ return; } if (!is_null($primarySidebar->getChild('Service Details Actions'))) { $primarySidebar->getChild('Service Details Actions') ->getChild('Login to cPanel') ->setUri('http://'.$domain.'/cpanel'); $primarySidebar->getChild('Service Details Actions') ->getChild('Login to Webmail') ->setUri('http://'.$domain.'/webmail'); } });
  27. 2 points
    That looks more like someone trying to gain counted posts to me. πŸ˜‰
  28. 2 points
    in the description, if the image files are uploaded locally to your WHMCS install... <img src="assets/img/sandwich.jpg"> <br> <b>Enjoy our delicious sandwiches!</b> don't add https:// or http:// into the image URL (the colon will cause issues) - if they're remotely hosted images, you can use... <img src="//domain.com/assets/img/sandwich.jpg"> for local images, you can to upload the images via ftp / cPanel file manager etc -and then reference their URLs in the description.
  29. 2 points
    Check out https://www.supportpal.com/integrations/whmcs-integration & https://docs.supportpal.com/current/WHMCS+Integration I've used it myself in a past life and it practically looks the same as WHMCS support its all nicely embedded in and has a similar look and feel as WHMCS Support Tickets, as an admin you would answer the tickets from the SupportPal UI
  30. 2 points
    I would consider this expected behaviour of Six - the reason why you're seeing it twice is because this client has already entered an answer to a security question - so the template is showing the question they chose and a field for the answer... that field is left blank in case they want to change their security question and/or answer - in order to do so, then will have to enter their existing answer again. after an answer has been updated, the template has access to the answer, so in the current session, it will show the answer (hidden as a password). if you had to, you could either get the page to show it by default if it exists - that's just a tweak to the template... either as a hidden password field or as text.
  31. 2 points
    instead of modifying header.tpl, I would have been tempted to use a hook because as far as I can tell, there are only two changes in the template... adding a link to the custom dark css file. the changing of the WHMCS logo. so the first you can inject with an adminareaheadoutput hook without any issue; the second is a pain because the logo url is hardcoded in the template... one option would be to just replace the default whmcs logo.gif file... yes, you'll have to replace it after each update - but theoretically you're going to have to check the css still works after every update too - especially a major update. the other two quick alternatives would be to just remove the logo using CSS (you already know which company you're working for - so unless you are logging into multiple different installs, then you don't need the WHMCS logo)... or you use JS to change the image on the fly (that would work, but you might see the default logo first and then the replacement logo loading afterwards). <?php function admin_dark_blend_css_hook($vars) { $currenttemplate = $vars['template']; if ($currenttemplate == "blend" ) { $head_return = ''; $head_return = '<link href="templates/blend/css/admin-dark.css" rel="stylesheet" type="text/css" /> <style>.logo {display: none;}</style>'; return $head_return; } } add_hook("AdminAreaHeadOutput",1,"admin_dark_blend_css_hook"); that way, if you need to disable the dark blend theme, you can just disable/remove the hook and it will default back to using "normal" blend. πŸ™‚
  32. 2 points
    Hi, Please check the screenshot, the number shown should be the Proforma Invoice number and even when the Proforma Invoice is changed to Tax Invoice after payment this number remains the same as Proforma. Hope this helps...
  33. 2 points
    and yet you're dumping ClientX and wanting to replace it with your own custom theme ?
  34. 2 points
    Updated to fix the CVV error (confirmed working) I've zipped it up with the proper folder structure now too, so you can just unpack it to root and it will put everything in the correct place πŸ™‚ Braintree.zip
  35. 2 points
    not sure which version you are using, but if it's v7.9.2, there was a hotfix released for usage metrics recording higher values...
  36. 2 points
    There's no such a thing in WHMCS. It took me weeks to find a workaround followed by months of frustration while coding but I gave up. I'd rather kiss the ugliest camel in the world.
  37. 2 points
    Use this action hook. <?php add_hook('AdminAreaHeaderOutput', 1, function($vars) { if ($vars['filename'] == 'invoices' AND !$_GET['id']) { $output .= <<<HTML <style> #sortabletbl0 tr td:nth-child(3) { text-align: left; } #sortabletbl0 tr td:nth-child(7) { text-align: right; } </style> HTML; return $output; } }); Result:
  38. 2 points
    Not everyone is happy with the general way v7 is going, (v6 and v5 where better) and since it seems v8 is coming next year or is planned at least. What are your main wish lists for that new version looking it from a developer or business view. What do you like WHMCS to change, improve or even remove in the future? Here is my list: More opt-in Make things more opt-in. Some things in v7 are not useful for more advanced users, like auto update, or the market store. I would like to have that stuff removed. Now I have more files and more bloat on my installation which I don't use and never will. This things should come as a separated module and if they are disabled or not installed, the code should not even be live in your server for security reasons, performance and just general simplicity. Less is more sometimes and many of those features I don't require as they are targeted to click one night operations, and not more longer power users that want to tweak and adapt WHMCS to their own operations. Bug Tracking A better bug tracker. Asking with a ticket if a bug is fixed or having to hunt down the change long on each release is painful and time consuming. Sometimes I think WHMCS as a company is very inefficient with some operations. Hiring people costs them money, so why do they want to babysit things like this. Having to answer tickets costs them time and this could be avoided with a proper bug tracker. This can't scale. Better feedback from users Feature requests. This is completely broken. Why use a different system when you have a nice community here? Build the feature requests and vote system here. If you don't want to build a bug tracker, you can even do the same here on the community for bugs and only customers with a valid license can access assuming WHMCS does not want to make this public. Slow down with features Longer releases. This could be a bit controversial but I would rather prefer WHMCS to slow down a bit. Every new release introduces more bugs than features. The Beta testing should be longer and I would be ok with maybe only 2 major releases per year. Just keep releasing patches for bugs. They are adding so many new things which are related to external services and I don't think they are aware the minefield they are creating. WHMCS should not be heavily coded to work with remote stuff. Try to build more things that work locally in your server instead of just releasing new features that require third party services. Longer Releases Longer LTS releases. They are not long releases if they only last a year. Look how Microsoft does it, 10-15 years. Or even Red Hat. The people using LTS are companies or enterprises and I'm not saying WHMCS should support them 10 years, but seriously 1 year or just a bit longer? Most developers even support their normal releases for at least 3 years. The LTS should be a minimum 3 years unless the PHP or code they rely on is not supported anymore, which is a different story. Can you imagine if everyone else did the same to WHMCS developers? Imagine if PHP was only supported 1 year, or Smarty, or anything. It would be a nightmare for them. So if they are aware that they rely on such much external code now, they should give the same considerations towards their customers. Not everyone has the time to update and make all their integrations the day they are released. This is a billing and cloud/hosting automation software. Not a blog like WordPress!!! And with that I mean security patches. Not even bug fixes. They don't have to even fix bugs or release new features on those versions. But please, at least still support them with security patches for 3 years after launch. It's the responsible thing to do. Better Mobile Mobile app is not updated for years. Show more love or open it up so we can add things. I have to rely on external services for ticket notifications and other things when this makes no sense if you have a mobile app. Instead of building things for something like Slack I'm seriously disappointed that WHMCS developers give more attention to external services then their own products. I can receive mobile notifications on third party services but not push notifications on my WHMCS mobile app. Shocking their own products are left to die. Finally, open up. You are benefiting from open source developers work but do the opposite to your own customers that are developers. Open up your code. Please just open up your code or at least the most important chunks to particular partners or companies. Make them sign what ever non disclosure agreement you want or even charge them. Your competition has none of your problems because the community can see and fix things. What is WHMCS so keen to protect here? Business users are not going to stop paying support and updates and they surely are not going to pirate the software. It's a bit childish, in particular because WHMCS would not exist today without open source work from others. WHMCS relies heavily on external third party open source code yet they even encode that. This is an insult to developers. They are taking all the code that is free and releases from other developers, and then pass Ioncube over it. One thing is protecting your code and licensing, the other thing is trying to protect code that is not even yours. WHMCS is encoding so much garbage that I'm sure this is the root of most of their bugs and problem because we cannot fix or see what they do. This is the biggest downside of using WHMCS. I don't think any serious provider will consider WHMCS for this reason. It's a blackbox. And I'm not talking here about the core, or billing stuff, or API stuff. No, WHMCS even encode things that affect your public website and cannot be easily modified or changed unless you make hacks around them software. You constantly have to intercept what WHMCS does and then transform the output because you have no idea what it does and how. It's a game I'm not willing to play in the future. Their competition advertises that they are 99% open code and only encode a few files related to the license. I don't expect WHMCS to do this but PLEASE if someone from the company is reading this, this is going to be your doom as a company in the next years. The minute competition comes up and is more open than WHMCS, those people are not coming back. Everyone is opening up in the software and technology industry. Even WHMCS would not exist as a company if it was not for other services developing API's which WHMCS is relies on for most of their connection. This is not the proper way to behave towards your developer customers. What exactly are they are trying to protect is beyond me. Even third party developers like Modules Garden and many others at least have an open version of their encoded modules. Everyone does at this point because they understand business users will not run things on their server they cannot fix, see what it does or just maintain. It's a trust thing. You would sell far more licenses and to people that actually have the money to pay. Do they distrust their own code so much? Well, the community would be able to constantly improve it with suggestions and fixes. Less work for their developers and the product would move forwards on its own. I just love how your competition works. The whole code is open, their whole bug tracker is open. This is causing frustration to those using the software and worse, forcing them to move out to custom solutions or more open platforms. WHMCS is never going to be flexible this way. And I would not complain about this if it was not for the fact that WHMCS is putting more and more code that was open in the past behind their ioncube wall. v6 and v5 had less encoded code/features, not more. I'm shocked on much WHMCS hates developers or people building their own sites around WHMCS because every new release is worse with more features behind the black box. This is now seriously affecting my business with things I cannot fix anymore or integrate. Everyone in the technology world understand proprietary standards are bad. And this is what WHMCS is doing, they are forcing people to even make simple changes using their own way of doing things. Why would I do this? Why should a PHP developer, or a HTML coder, or a JavaScript person learn how to do things the WHMCS way which is inefficient, buggy and even performs bad on a server? Those people want to use the standard coding procedures WHMCS developers use. Not the stupid hooks and API to even change something like a link. And I say stupid because this is exactly how I feel about WHMCS v7 at this point. You have to make a special PHP hook code (the WHMCS way) to change the sidebar text, colors or links. In the past I could just open the .tpl file and change it. Why? Because WHMCS is removing code from templates and putting it behind the IonCube wall. One day, the templates will be worthless and most WHMCS websites that are customized are going to be horrible slow because users have to create 240 hooks to change colors, links, or even text. Personally, I have access to all the database. And if I see v8 is not being more open but more closed. I'm moving out. I cannot trust my business operations to a company that wants to keep their customers under ransom. And this is how I feel when I cannot even fix the most simple bugs because the files are encoded. So my biggest wish list for v8 is for WHMCS to start being more open and trying to move towards that trend. They profit from open source but seem to hate open source which is a rather a strange business approach. One day, some of those developers may change their licenses and forbid their codes from being used in obfuscated software. If that day comes, WHMCS will have to remove that code from their software or change the way they work in terms of developing.
  39. 2 points
    the quick way would be to do them inline and just add your font colors in there.. <td valign="top" class="footerContent">&nbsp;<a href="{$company_domain}" style="color: red;">visit our website</a><span class="hide-mobile" style="color: red;"> | </span><a href="{$whmcs_url}" style="color: red;">log in to your account</a><span class="hide-mobile"style="color: red;"> | </span><a href="{$whmcs_url}submitticket.php" style="color: red;">get support</a>&nbsp;<br />Copyright &copy; {$company_name}, All rights reserved.</td>
  40. 2 points
    too many years of knowing which variables/array are available on an admin area page... πŸ˜‰ out of the box, the stats array wouldn't contain those values about todo items... you would need a simple hook to query the table to get the value - i've PM'd you a basic hook to do that, and it will give you a {$todostats} variable which you can use in the admin area template to show how many to do items there are that are not completed... as written, it gets the total for everyone, to get a total for the current logged in admin, you can just uncomment the line in the hook that i've commented out. and then with regards to the language files, it's just a case of working your way through english.php (or your own language) to see if an appropriate string already exists for your need - if not, either use a Language Overrides or just hardcode it in the template.
  41. 2 points
    not by default I think... there would be workarounds, e.g you could... add links to Lara's menus - you could upload these files anywhere, you wouldn't particularly need to use WHMCS to upload them. create a widget to output these links - if you're going to use downloads for this, then that's a query to the tbldownloads database table. the Staff Noticeboard addon (already within WHMCS) would be an option, but it doesn't natively support clickable links - it has it's own homepage widget, but it's encrypted, so to make it's links clickable would probably require a custom widget. (worth noting that the staff noticeboard addon is supposedly being deprecated/removed, but it's still currently in the v7.9 beta). various admin hook points would be available depending on how/where you wanted to show these links. there would be various staff addons available in Marketplace, but i'm not sure if any would use downloads... check them out for yourself though. downloads aren't really supposed to be used by admins in this way - they're for clients/products... so if you use this, I wouldn't particularly add anything that you wouldn't want a client to see!
  42. 2 points
    editing clientareahome.tpl would be the easiest way - you could do it with css in a custom.css file, but then you'd be left with a space in the output... ... but if you edit the template, you'll be able to resize the remaining tiles for fill the space, or alter their content to suit your site. with some effort, you could probably remove/resize them using jQuery, but editing the template will be simpler.
  43. 2 points
    no worries - all I did was quickly take the example AdminHomepage hook from the docs, copied the <div> from the badges.php widget and tweaked the output a little (removed icons, classes and added some inline CSS)... πŸ™‚ <?php add_hook('AdminHomepage', 1, function($vars) { return '<div class="row home-status-badge-row"> <div class="col-sm-6"> <div class="health-status-block status-badge-cyan clearfix"> <div style="color:black; font-size: 20px; text-align: center;"> Mission: Lorem ipsum dolor sit amet, consectetur adipiscing elit. </div> </div> </div> <div class="col-sm-6"> <div class="health-status-block status-badge-cyan clearfix"> <div style="color:black; font-size: 20px; text-align: center;"> Vision: Lorem ipsum dolor sit amet, consectetur adipiscing elit. </div> </div> </div>'; }); I think I have more belief in you being able to write this type of hook than you do yourself. 😎
  44. 2 points

    Version 1.0.0


    An issue has been identified in the 7.8.2 release - published on 6th September 2019, that can result in an error when visiting the pwreset.php file directly: Call to undefined function WHMCS\CALinkUpdateCC This is caused by the introduction of new Friendly URLs for the password reset path /password/reset/begin Attempting to access the old location at pwreset.php results in this error. This hotfix applies only to 7.8.2
  45. 2 points
    This is an ongoing issue as I am sure everyone knows. When a ticket is created, if that person is a contact or sub-account, it will not put that person name on the ticket, it will instead say it is from the acocunt holder. This means you don't actually know who you are talking to, and it also looks very unprofessional when you constantly address clients by the wrong name. In this age of people being offended by everything, especially being referred to by the wrong gender pro-noun, I really want to find a solution to this problem.
  46. 2 points
    Hi all, Grizzlyware has just released Ranger for WHMCS, which will allow you to generate, manage and distribute license keys for software that you sell, via WHMCS. It's much like the WHMCS 'Licensing' module, however it has only just been released, so while it's fully functional and full featured, there is more to be added. We built Ranger to satisfy our own needs, it's open source and allows developers to license their software in the field. This is a WHMCS module which uses the Ranger framework. You can of course use the Ranger library on its own if you prefer. The module is bundled with email templates too. It's free - There is no charge for this module or the Ranger framework, all of the source code is available online as well as a packaged up WHMCS module. More information can be found here: https://www.grizzlyware.com/apps/whmcs/ranger/ We will have more WHMCS modules coming out in the not too distant future too. With that said, we just released 'Email Catcher' which scans your ticket replies for mismatched client email addresses (so you don't send an email address to the wrong client). Any questions or confusion, please give me a shout. Thank you, Josh
  47. 2 points
    absolutely correct... it's of some use for those new users who don't have experience with other suppliers - but i've said it before, I don't agree with it being in the core program and I will never used it commercially.
  48. 2 points
    I don't see why not, it's just a calculation based on the prices - leave it with me and i'll update after v7.8 goes GA (or as I like to think of it, it's final public beta). ☺️
  49. 2 points
    For both _remoteinput and _remoteupdate, return only HTML -- so just a string. So if you return "blah", only "blah" should show where the card form used to be . This completely overrides WHMCS form, except for the 3dauth stuff on the credit card checkout page. Also for both functions, have the form set to return to the proper file -- so _remoteinput should post to creditcard.php and _remoteupdate post to clientarea.php?action=creditcard. Then in both functions process the posting as needed. For remoteupdate, attach the card to the customer. For remoteinput, attach the card and then charge the invoice via capture API. (of course, you would check if $_POST has content and validate as needed. Are both of you only returning HTML / string? If not, there is your problem. Template changes are not needed for this, thankfully as I dislike doing so. What I did was use smarty to generate the HTML via its fetch function and return that. WHMCS happily spits out the HTML, though it mucks with the credit card checkout form because of 3dauth. Let me know if you continue to hit a wall on this as I know I was hitting my head on that wall a bit.
  50. 2 points
    @string is absolutely correct with his suggestion - using a Client Custom Field would be the way to go... the user would be asked to create it during their first order (if they're a new client), or if they are an existing client and logged in, they'll be able to edit the answer to your security question in their client area profile. I replied to a similar question last year with example code... it's very simple thing to do - you just need to decide where you want to show the PIN to the client... in the above example, it was a homepage panel... but you could equally put it in a sidebar (new/existing and decide which pages to show it on), menu navbar or output it in a template. it would only require one hook file to display the PIN in both the admin and client areas - to use it, you would create a .php file in /includes/hooks, call it 'phonepin.php' and paste the code below into it... <?php # Telephone Security PIN Hook # Written by brian! add_hook('ClientAreaHomepagePanels', 1, function($homePagePanels) { $client = Menu::context('client'); $length = 8; $phonepin = substr(preg_replace("/[^0-9]/", "", md5($client->id)), $length, $length); if ($phonepin) { $homePagePanels->addChild('Telephone PIN', array( 'name' => 'Pin', 'label' => '<strong>Telephone PIN</strong>', 'icon' => 'fa-life-ring', 'order' => 99, 'extras' => array( 'color' => 'pomegranate', ), 'bodyHtml' => '<p>Should you need to telephone Support, your PIN is: <strong>'.$phonepin.'</strong></p>' )); } }); add_hook('AdminAreaClientSummaryPage', 1, function($vars) { $length = 8; $phonepin = substr(preg_replace("/[^0-9]/", "", md5($vars["userid"])), $length, $length); return "<div class='alert alert-success'><strong>PIN: ".$phonepin."</strong></div>"; }); in this example, it's creating a basic PIN unique to each client and displaying it in a Panel on the Client Area homepage (the red box bottom-right)... ideally, if you're site is multilingual, then you would use a Language Overrides to display both the panel label and the line of text within $bodyhtml in the client's language. in the Admin Area Client Summary page, it will also output the same PIN for that particular client... as I said previously, you could output it in a sidebar too (as shown in first image)... add_hook('ClientAreaPrimarySidebar', 1, function($primarySidebar) { $client = Menu::context('client'); $length = 8; $phonepin = substr(preg_replace("/[^0-9]/", "", md5($client->id)), $length, $length); if ($client && $phonepin) { $primarySidebar->addChild('Telephone PIN', array( 'name' => 'Pin', 'label' => 'Telephone PIN', 'icon' => 'fa-life-ring', 'order' => 10, 'bodyHtml' => '<div class="text-center"><strong>'.$phonepin.'</strong></div>' )); } }); ... or in the secondary navbar... add_hook('ClientAreaSecondaryNavbar', 1, function($secondaryNavbar) { $client = Menu::context('client'); $length = 8; $phonepin = substr(preg_replace("/[^0-9]/", "", md5($client->id)), $length, $length); if ($client && $phonepin && !is_null($secondaryNavbar->getChild('Account'))) { $secondaryNavbar->getChild('Account')->addChild('Telephone PIN', array( 'label' => 'Telephone PIN: '.$phonepin, 'order' => 75 )); } }); as you can see, there are various options - all of which can be expanded to suit your needs.
  • 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