Jump to content


Popular Content

Showing content with the highest reputation since 12/27/2019 in all areas

  1. 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
  2. 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.
  3. 2 points
    I would agree with that - i've always kept personal and business domains/accounts well away from WHMCS.
  4. 2 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'); } });
  5. 1 point
    Sorry, I forgot to include Capsule. Use this: <?php use WHMCS\Database\Capsule; require __DIR__ . '/init.php'; $gmailPassword = "MyPassword"; $command = 'EncryptPassword'; $postData = array( 'password2' => $gmailPassword, ); $results = localAPI($command, $postData); print_r($results); $results['password'] contains your password en encrypted format. You can insert this into the database like this: <?php use WHMCS\Database\Capsule; require __DIR__ . '/init.php'; $gmailPassword = "MyPassword"; $command = 'EncryptPassword'; $postData = array( 'password2' => $gmailPassword, ); $results = localAPI($command, $postData); $newPass = $results['password']; $changePassword = Capsule::table('tblconfiguration')->where('setting', 'SMTPPassword')->update(['value' => $newPass]);
  6. 1 point
    Ah, okay. Use the EncryptPassword function instead: https://developers.whmcs.com/api-reference/encryptpassword/
  7. 1 point
    they would have a value of "on" if they have been ticked. the problem with custom fields in this context is that there are (or can be) multiple fields (and their values) that may or may not apply for any given domain/service... the default WHMCS reports all tend to expect value per field... so what's required in your case is more than a little tweak. it does - what you will need is effectively two custom reports (ine for domains, another for services), using new filenames to ensure that they're not overwritten during a WHMCS update. I see that you've started a SO&R thread, but it's worth noting that developers in such threads will not publicly post a price for projects like this, they will all ask you to go to their sites and complete their contact forms... and then give you a quote privately.
  8. 1 point
    to put it in to Maintenance Mode... UPDATE tblconfiguration SET value = 'on' WHERE setting = 'MaintenanceMode' to disable Maintenance Mode... UPDATE tblconfiguration SET value = '' WHERE setting = 'MaintenanceMode'
  9. 1 point
    you could cut the number of lines, e.g instead of declaring an array and returning it, just return the string. you should just need to change the filename in the link - that's all. if you're not going to view your admin area via mobile devices, or at least don't need to see facicons when doing so, then you won't need those middle 2 lines - just the first and the return.
  10. 1 point
    7. WHMCS Calendar - that can have recurring events (weeks/months/years etc)... though no automated emails are generated and there is no longer the calendar widget on the homepage (though the old calendar widget still works if you copy it from an older install). you could probably write a hook to convert them to todos/emails etc. I can see a possible solution in Marketplace, but i'd go along with Kian on this and do it outside of WHMCS if you can.
  11. 1 point
    6- MS Exchange calendar (or Google equivalent). You can also configure it to send you reminders, set an alarm on your phone, send an email etc. That's how I remember my gf birthday 😘
  12. 1 point
    @brian! It's people like you that I love 🙂 I will give that a try. Thanks for the continued help! Happy New Year! Cheers!
  13. 1 point
    Setting them to free would work. Personally for my own personal hosting accounts/domains I have never added them to WHMCS. I have not seen a benefit to doing that aside from the one click login from within the client profile.
  14. 1 point
    Hello @markc, Perhaps Client Groups can be of use here: https://docs.whmcs.com/Client_Groups Create a client group that has group discount of 100%, then assign your client account to this group.
  15. 1 point
  16. 1 point
    Welcome to WHMCS.Community Kamran! 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. 1 point
    Made a very small typo in the first. Use this instead: <?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', 'status' => 'Completed', ); $results = localAPI($command, $postData); } }); Remember to update 'adminid' with the actual ID of an admin. UpdateToDo.php
  18. 1 point
    thanks! 🙂 in that first link I gave you, there was another hook that creates a login form, and if your WHMCS contains the username/password to their service, then that can be used to login directly to their cPanel... ... though i'd suggest changing http to https and adding 1 to the ports uses for cPanel/Webmail (2083 & 2096)... that second link I gave you does contain an updated version of the above hook that doesn't need username/password for the cPanel link, but it uses the default URL of clientarea.php?action=productdetails&id=xxx&dosinglesignon=1 for the cPanel link - which is no good for you as that's the URL you're having problems with. if you can't get that second hook to suit your needs, then as @penguin suggests, you might be better off changing your WHM (not WHMCS) redirection settings - you may need to contact your host for help with that.
  19. 1 point
    So I chose the hooks way to get the same implemented into the admin interface. Below is the hook to be used to make it display the required custom field's value along with the product name: <?php if ( !defined('WHMCS')) { header("Location: ../../index.php"); } use WHMCS\Database\Capsule; // Please set custom field id here. $customfieldId = 1; if($_REQUEST['getAll'] == '1') { if($_REQUEST['userid'] != '') { $all = Capsule::table('tblcustomfieldsvalues') ->join('tblhosting', 'tblcustomfieldsvalues.relid', '=', 'tblhosting.id') ->where('fieldid', $customfieldId ) ->where('userid', $_REQUEST['userid'] ) ->get(); }else { $all = Capsule::table('tblcustomfieldsvalues')->where('fieldid', $customfieldId)->get(); } $all = json_decode( json_encode( $all ) , true ); $newAll = []; foreach($all as $a) { $newAll[$a['relid']] = $a['value']; } ob_clean(); echo json_encode(array( "all" => $newAll )); die; } add_hook('AdminAreaPage', 1, function($vars) { if( $vars['filename'] == 'clientsservices' ) { echo '<script> document.addEventListener("DOMContentLoaded", function(){ $.post(window.location, { getAll: 1 }, function(data, status){ var data = JSON.parse(data); var first = []; setInterval(function() { var x = document.querySelectorAll("[data-value]"); for (var i = 1; i < x.length ; i++) { if(typeof first[x[i].dataset.value] === "undefined") { first[x[i].dataset.value] = x[i].innerText; } if(typeof data.all[x[i].dataset.value] !== "undefined" && data.all[x[i].dataset.value] != "") { x[i].innerText = first[x[i].dataset.value] + " - " + data.all[x[i].dataset.value]; } } }, 100); }); }); </script>'; } if( $vars['filename'] == 'clientshostinglist') { echo '<script> document.addEventListener("DOMContentLoaded", function(){ $.post(window.location, { getAll: 1 }, function(data, status){ var data = JSON.parse(data); var table = document.getElementById("sortabletbl1"); var rows = table.rows; for (var i = 1; i < rows.length ; i++) { if(data.all[rows[i].cells[1].innerText] != null && data.all[rows[i].cells[1].innerText] != "") { rows[i].cells[2].innerHTML = rows[i].cells[2].innerHTML+ " - " + data.all[rows[i].cells[1].innerText]; } } }); }); </script>'; } }); The only thing that needs to be setup is the $customfieldId inside the hook. Hope this is useful to someone. Thanks!
  20. 1 point
    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.
  21. 1 point
    Thank you Brain, already got it forgot to update. can you look in this thread https://forums.whmcs.com/showthread.php?128295-Need-Improvement-in-Standard-Cart-Order-Template/page3 ?
  22. 1 point
    the code in post #3 will do that. https://forum.whmcs.com/showthread.php?124790-Adding-a-quot-Credit-Balance-quot-panel-to-the-client-area-home-page&p=500630#post500630
  23. 1 point
    Hi, the following module is useful for hosters which provide support via live chat or telephone. The client generates a PIN code to ensure that it is the actual account holder. A further purpose would be that the customer gives his pin to a trust person who takes care of his request. The PIN will expire after a given time frame. If the client generates a new PIN, the old PIN will be invalid. At configuration you can specificate which employees have access to all generated pins. If an employee is not specificated he needs to use the search mask to check the pin. On success, the client will be shown. If you are using WHMCS v6 or v7 you can make use of the new support PIN sidebar widget! At the module configuration you can also exactly specificate on which pages the sidebar widget should appear. Compatbility: WHMCS v5, v6, v7 & PHP 5, PHP 7 Documentation and Screenshots Orderlink Regards.
  24. 1 point
    The WHMCS Sitemap module makes it so simple to add a fully dynamic, valid and stylish sitemap to your WHMCS install. This plugin, is simple to use, simple to setup, and provides a much easier way of getting a sitemap for WHMCS system than can be achieved any other way. No longer will you have to visit a sitemap generator website, wait, wait, wait, then edit/upload files on your hosting plan. The WHMCS Sitemap Generates a sitemap which can be submitted to all the major search engines and adheres to the sitemap protocols set out for sitemaps. The sitemap also features a xsl stylesheet to give your sitemap a user friendly appearance. Custom pages can be added/edited/removed all on the fly from within the admin interface. Options for pages include : URL Priority Change Frequency Last Modified. Whats more, integration for 3rd modules now possible, soon our cms and forum modules will automatically add your content to the sitemap! Check it out here: WHMCS Sitemap
  25. 1 point
    Go to setup > administrator roles > full administrator - under widgets tick "Staff Noticeboard"

Important Information

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