Jump to content


Popular Content

Showing most liked content since 02/21/2018 in all areas

  1. 2 points
    they should be able to see it in their notfications dropdown in the header... alternatively, @sentq posted a sidebar hook to show the credit balance... and I posted how to add it as a homepage panel...
  2. 2 points
    yesss... but why would you want to ? it's an admin reminder tool, why would clients ever need to see its content? I suppose they could see to-dos related to themselves (pulled from description field), but even then... why?? I can't get my head around it. err ok... I can immediately see a number of errors... ... would only work if an admin was logged in and viewing a page, not clients in general.... if you're going to go down your specific admin route, just hardcode the value into the query. the field is called 'admin', so your query would never find any results. if it's for a client area page, then don't use an admin area hook - it would never get called... you would use ClientAreaPage and, ideally, limit it to only be called on your specific todo page. this part is fine... well it's at least functional and will output the array... would ideally need cleaning up with regards to layout.. I suspect the hook you're looking for is closer to the one below... <?php # Todo Logs For Public / Client Area # Written by WHMCS Community (or hopefully brian! / sentq) use Illuminate\Database\Capsule\Manager as Capsule; function hook_client_todo_logs($vars) { $client = Menu::context('client'); $user = 'Client ID '.$client->id; $todologs = Capsule::table('tbltodolist') ->where('description', 'like', $user.'%') ->get(); $encodedata = json_encode($todologs); $decodedata = json_decode($encodedata, true); return array("todologs" => $decodedata); } add_hook("ClientAreaPage", 1, "hook_client_todo_logs"); ?> so this queries the table for mentions of the current logged in client's ID and sends the resulting array back to the template - where you can output it in your table. if you still want to go down your route of using an assigned admin, then just change the where to... ->where('admin', '4')
  3. 2 points
    https://docs.whmcs.com/Additional_Domain_Fields for you, it would be along the lines of.. $additionaldomainfields[".xyz"][] = array("Name" => "Terms Confirm", "LangVar" => "xyzterms", "Type" => "tickbox", "Description" => "I confirm that I have read this <a href=\"https://www.google.com\">link</a> before registering", "Required" => true);
  4. 2 points
    @sitesme if you need it as a hook file here it is <?php # Fix Six Template's Content Area add_hook("ClientAreaHeadOutput", 1, function($vars){ return '<style type="text/css">.main-content {min-height: 600px;}</style>'; }); create new php file inside /includes/hooks/ directory called "FixSixTemplateContentArea.php" or anything else as you prefer and place the previous code inside it, now you can forget about fixing this issue again
  5. 2 points
    not in a single click, it might take two or more! reports -> Batch Invoice PDF export -> then select the conditions you want and download the multi-page PDF file.
  6. 1 point
    I knew the core solution was mine, but it just saves me time if someone sees your screenshot and asks how to do it... I can link to your post now!
  7. 1 point
    at least for the time being. it might be worth opening a ticket with support, explaining the problem and that you think Friendly URLs are the cause.... and expanding on your specific environment because it's not a problem that every user has, only specific ones and it would be helpful for WHMCS to determine common factors as to why this isn't working for you. at best, this may get added to v7.5 (but nothing in changelog yet)... but to be honest, you're probably better off sticking with Basic URLs until this gets resolved.... it's a relatively new feature, and sadly from experience, will probably remain bugged for a few more releases yet.
  8. 1 point
    then add @cyben76 code above and that will fix it.
  9. 1 point
    well using toNumeric() would be the simplest way, but if that's not working and you know what you want to replace... {$total|replace:'$':''|replace:'€':''|replace:'USD':''|replace:'EUR':''}
  10. 1 point
    I ran a few tests on our test environment. Looks good. I didn't find any issues so far. I appreciate the quick resolution @WHMCS John!
  11. 1 point
    Hi all, Thanks for your continued feedback and discussion on this matter. We understand this is an important issue for some users, and as such I'm pleased to advise that in version 7.5 RC1, a new option has been added to the Tax Rules page which will allow you to choose how tax is calculated by WHMCS throughout: Calculate individually per line item (Default) Calculate based on collective sum of the taxable line items The documentation for this is located at: https://docs.whmcs.com/Tax/VAT#Tax_Calculation_Method This is a non-trivial change, so whilst 7.5 is in the pre-release testing phase we are keen to get as many people as possible to test out both modes, and ensure everything is working as you expect. Therefore I invite all participants in this thread to install WHMCS 7.5 RC1 in a test environment and give it a thorough testing before stable release: https://blog.whmcs.com/133429/whmcs-75-reaches-release-candidate-status https://preview.whmcs.com/ https://whmcs.community/forum/413-v75-beta-discussion/ The pre-release testing phase is always your best opportunity to provide feedback for quick iteration before everything is locked in for the stable release, so please let us know!
  12. 1 point
    Second. Jetbackup is so easy to use, it's not funny. You just need a server to put the backup on, and you should have that already. Don't rely on WHMCS for your backups. Use proper backup methods
  13. 1 point
    notifications are an absolute pain to code - how many notification hooks have you ever seen posted in this place? precisely.
  14. 1 point
  15. 1 point
    The bulk invoice download. In the EU we need to give the government every semester/year/month all the invoices we charge to our customers. Instead of downloading them 1 by 1, you can download them over a certain periode.
  16. 1 point
    This script will add support for Non-Latin characters in WHMCS Knowledge Base URLs. by default WHMCS allow only Latin (a-z) characters in SEO URLs, after installing this action hook all Knowledge Base URLs will be re-generated and all Non-Latin characters will be translated to Latin characters and give you valid and search engine friendly URLs. Mod Type: Action Hook This Mod features: 1) Re-Generate URLs for articles and categories inside WHMCS knowledge base. 2) Re-Generate URLs for bread crumbs in the same section to. 3) No template modification required. How to Install: 1) Download the ZIP from: http://whmcms.com/downloads/6/Free-Hooks-and-addons-modules#item1 2) Upload the contents from #1 to " /includes/hooks/ " directory 3) Activate "KB SEO Friendly URLs" feature from Admin area > Setup > General Settings > Support tab.
  17. 1 point
    {$serverdata.name} should hold the name of the server - so it should just be a case of tweaking the template, probably clientareaproductdetails.tpl (or the overview.tpl if it's a cPanel product) and adding the variable wherever you want to show it.
  18. 1 point
    magic. the address @ IANA is correct and will work (change it for mine if you like) - but all new gTLDs will (or should - there are exceptions!) use whois.nic.*TLD* as their whois server (often just redirecting back to the registrar)... then it's just a case of working out the correct availability string.
  19. 1 point
    Welcome to WHMCS.Community Kodelabs! 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.
  20. 1 point
    if the invoice contains only this one product, then that shouldn't really occur... have you made any modifications to the template, or any hooks that could be interfering with the gateway generation?
  21. 1 point
    I created a hook for that, It's worked. add_hook('EmailPreSend', 1, function($vars) { $merge_fields = []; if ($vars['messagename'] =='Invoice Payment Reminder') { //get customer id fom invoice id $invoice_id = $vars['relid']; $invoice_sql = Capsule::table('tblinvoices') ->where('id','=',$invoice_id) ->first(); $userid = $invoice_sql->userid; $blocked_ids = array(11,12); if(in_array($userid,$blocked_ids)) { $merge_fields['abortsend'] = true; } } return $merge_fields; });
  22. 1 point
  23. 1 point
  24. 1 point
    This actually has been added in Version 7.5 (which is currently in the Beta stage): https://docs.whmcs.com/Changelog:WHMCS_V7.5 as: FEATURE-1874 - Add merge fields to email templates that provide URLs allowing users to opt in or out of receiving marketing emails
  25. 1 point
  26. 1 point
    This does seem a bit backwards, IMO, if the system isn't directly told to terminate (ie: the enable termination button isn't ticked), one would (rightly) expect it to not terminate , period.
  27. 1 point
    perhaps because we don't understand exactly what you want to do.
  28. 1 point
    Welcome to WHMCS.Community Popetrix! 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.
  29. 1 point
    there are two ways to do this... 1. if you don't want clients to register without ordering, you can remove the "Register" option from the admin settings by unticking the checkbox below and that will remove the link... setup -> general settings -> other -> Allow Client Registration Opções -> Configurações Gerais -> Outros -> Permitir Registro de Cliente 2. if you just want to remove the link in the secondary sidebar, you can use an action hook - so create a new .php file in /includes/hooks, call it 'registerlink.php' (or whatever you want) and paste the following code into it. <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondaryNavbar', 1, function (MenuItem $secondaryNavbar) { if (!is_null($secondaryNavbar->getChild('Account'))) { $secondaryNavbar->getChild('Account') ->removeChild('Register'); } }); you won't need to use both solutions - so just choose which is best for your situation.
  30. 1 point
    I have migrated some client records and now doing bulk updating of passwords in WHMCS. I am getting the error "Fatal error: Maximum execution time of 300 seconds exceeded in /home/whmcs/public_html/vendor/whmcs/whmcs-foundation/lib/Security/Hash/Password.php on line 0" despite having max_execution_time to 0 in the php.ini file. Does this particular file throwing this error override php.ini? Whats the workaround?
  31. 1 point
    Hello there, Welcome to the community!
  32. 1 point
    It makes a lot of sense. I thought this was happening to all users using Six theme. Thank you so much for this tweak @sentq. It will certainly not get overwritten now Well... since I am not a programmer, I would need the hook itself but it is all sorted out. Thank you all
  33. 1 point
    ironically, the auto-updater would give you a warning about that file when updating, e.g back it up before updating. Hmmm... I do take backups, but my point is that I don't want to restore files manually every time there is an update. The file will get overwritten no matter what, right? I don't see what the backup has to do with it. Ok! Now we are talking Thank you @sentq I was just about to create a new file inside the hooks directory but... I realised that there was already the file "WHMCS_SixTemplateCreditBalance.php" and I just added your code at the end of this file. It seems to work! I am now wondering why this code wasn't added since the beginning since it seems a common problem reported by some others as well. In an attempt to help, here is my final file with the last code added: https://gist.github.com/anonymous/e5a36f9db07440e260df1c0493931f83 Thank you all once again.
  34. 1 point
    why not try it and see? the answer is that it likely will if you change ClientLogin to AdminLogin... <?php # Force Admin Redirection After Logging In function hook_forceAdminLoginRedirect($vars){ global $CONFIG; # Add Redirection URL Here $URL = "http://www.bbc.co.uk"; echo '<meta http-equiv="refresh" content="0; url='.$URL.'">'; exit; } add_hook("AdminLogin", 1, "hook_forceAdminLoginRedirect"); ?> in your case, change the BBC link to your specific page.
  35. 1 point
    assuming that you follow this documentation, at the end of your custom page code replace this line: $ca->setTemplate('{your-template-file-name}'); with this: $client = Menu::context("client"); /* Only clients from the specified groups will be able to see content of this page others will see the restrictive message instead separate group ids by comma */ $allowedGroups = array(1, 2, 4); # Display page content if client assigned to one of the specified groups # Replace {your-template-file-name} with your template name if (in_array($client->groupid, $allowedGroups) || isset($_SESSION['adminid'])){ $ca->setTemplate('{your-template-file-name}'); } # Display special message for others else { $ca->setTemplate('content_restricted'); } now inside your active template directory, create new file called "content_restricted.tpl" and put the following lines inside it: <div class="alert alert-warning"><p>content of this page only available to specific clients under specific criteria</p></div> after this, when a client from one of the specified groups access the page, content of that page will be displayed normally (the same for logged in admins), but for visitors or clients from other groups it will display a message indicating that the content of this page is restricted. it's also possible to redirect user to specific URL instead of displaying the restricted message, for this replace the $ca->setTemplate('content_restricted'); with: header("Location: index.php"); exit;
  36. 1 point
    I opened a trouble ticket on this as my post here was waiting on moderator approval. The reply I received from support suggested adding this line of code to the configuration.php file. date_default_timezone_set('America/Chicago'); I added this as the last line of code and I can confirm it is working properly in my environment 7.4.2. Your results may vary or break your site. This is a undocumented configuration method, use the aforementioned information accordingly.
  37. 1 point
    I think you'd need a js solution for that as it's being refreshed by js... also, the correct price is shown in order summary (for that billingcycle if it's priced)... if it isn't priced, it still shows the lowest billingcycle price (it's a mess!)... but yes, it should change the display. that would require significant changes... and heading off into the feature request realms. let us hope these issues are addressed in v7.5 next month. I will add that all the prices are there available to the template, so if you wanted to show all available prices for the addon, you could do so.
  38. 1 point
    I thought this is a Developers corner, not commercial? I also thought digging into code, developing things, helping each other inside developer community is suppose to be a good thing. Kinda strange that I have to explain myself why and what I want to do exactly. I am not developing any commercial product for WHMCS, I just want to code here.
  39. 1 point
    Hello Thank you for your post! We set the max_execution_time to 300 by default however you can override this by adding the following variable to your configuration.php file: $overidephptimelimit=600; The example above sets the max_execution_time to 600, however you can adjust it to your needs. Please note: This variable is deliberately misspelt, it's not an error, we do this on purpose.
  40. 1 point
    for the INS in webhook try using http instead of https. It worked for me. So instead of https://www.xxxxxx.com/clients/modules/gateways/callback/tco.php use http://www.xxxxxx.com/clients/modules/gateways/callback/tco.php
  41. 1 point
    Without any meaning for personal attacks, but sorry to say, is $199 a normal price for a template? Have nothing against you. Actually the template that I'm using in my site is your eNO and works super fine. And all this for $27. $199 is about 80% of the price that cost WHMCS before starting selling it with monthly subscription. In anycase I wish you good luck in your sales. But if sometime see people going away from WHMCS is because the total cost (Main script, 2-3 addon modules and a template), should be high.
  42. 1 point
    Hello, I would recommend starting with forums as they are free and easily. You can post your web hosting plans in the offers section on many hosting forums. I would also recommend joining in on the discussions and adding value. You can gain a good reputation by doing this over time.
  43. 1 point
    Just wanted to jump in and give you a big Thank you for this lil module. Works perfectly for my needs!
  44. 1 point
    Lek, I think you deviated too far from sentq's original code - something like the following should work... <?php function hook_setpagetitle($vars){ // also you can set title per page URL if ($vars['filename']=='index'){ $pagetitle = "Home Page"; } elseif ($vars['filename']=='cart' && $vars['gid']){ $pagetitle = $vars['groupname']; } elseif ($vars['filename']=='contact'){ $pagetitle = "Contact us now"; } if ($pagetitle) { return array("pagetitle" => $pagetitle); } } add_hook("ClientAreaPage", 1, "hook_setpagetitle"); ?> when in the cart, it should automatically show the Product Group Name for each group - so that should remove the need to add each group manually to your hook code! you should be able to work your way through all steps of the cart using the existing variables - $templatefile should be useful for the remaining cart steps, but you may need to use other variables too. i'd be inclined to remove the "Set Page Title Here" line and let WHMCS use it's own default title for pages you haven't specified... the above hook will only change the pagetitle if the conditions specified in the hook are met; if they aren't, then the hook doesn't make any changes and WHMCS will use what it normally uses for each page.
  45. 1 point
  46. 1 point
    It depends on your perspective. On a short term basis, using an external software integrated with WHMCS is quick, cheaper and requires less skills. On the other hand you are overcomplicating the entire system therefore on a long term basis probably you will regret it. Let me make an example: WHMCS (clientarea) + Wordpress (home page) + Magento (e-commerce). One day you want to change the style of your website, link a new page or add a new feature. Good luck You have 3 different logins, database, admin interfaces, template system, structure, languages etc. Not to mention that you need to keep up to date and maintain 3 different systems which triples your security risks and the number of problems. Personally I find this approach sloppy, tedious, frustrating, expensive and a waste of time on a long term basis. It gives me negative feelings because objectively it slows my daily job and increases the load on my servers. Of course if you want to achieve the same results just using WHMCS, you need to invest more time but on a long term basis you'll definitely love it. You can apply changes, even drastic ones, quickly and adapt to changes almost immediately. You have one database, login, admin interface, template system, language and only one system to keep up to date and secured. Now back to your question, I suppose that you only need a sort of spectacular home page. This is a super-easy task that can be achieved without using Wordpress or any other CMS. Build your spectacular website on your favorite HTML editor or on Paint or buy a ready-made template (it can be also a Drupal template, it's not important) then convert it into a WHMCS template. It's not difficult. It simply requires a bit more time compared to the installation of Wordpress with a theme. Of course this is my opinion and my personal taste. Using Wordpress or any other CMS with WHMCS is not even in my options list. For me there are just integrations with API or custom-made solutions. I hate bridges.
  47. 1 point
    i'm guessing you're talking about the currency sidebar ? you could use an action hook to remove it - create a new file in includes/hooks, give it an appropriate filename, e.g currencysidebar.php and paste the following code into it... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Choose Currency'))) { $secondarySidebar->removeChild('Choose Currency'); } }); the currency sidebar should now be removed.
  48. 1 point
    You can do it through the client's profile page. Find the dropdown menu with "active" "inactive" and "closed"
  49. 1 point
    Hi, This feature will be implemented over the next few months. It is on our To Do list for the system along with many other new features. Matt
  50. 1 point
    WHMCompleteSolution is now officially released. You can view the demo at http://www.whmcs.com/demo.php.

Important Information

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