Jump to content

Recommended Posts

Download the file,extract and upload /overwrite it

at /whmcs-root/includes/jscript




This JS files adds the 52 Greek stats in Greek language, so your customer's can select and NOT fill the state. :idea:



Edited by zstergios

Share this post

Link to post
Share on other sites

Hello and Happy new year.. !

Any chance of fixing this for whmcs v7 ?

Καλή χρονιά φίλε μου με υγεία, αγάπη και ότι άλλο επιθυμείς για το 2019 να το έχεις.. !

Share this post

Link to post
Share on other sites
11 hours ago, DraGoNeTi said:

Any chance of fixing this for whmcs v7 ?

whilst waiting for zstergios' hook, try the following file - working for me on v7.6 (just needed re-encoding because of the greek characters).


i've no idea if that list of Greek states are still accurate, i've just copied that one required line of code from the v6 version previously posted. 🙂



Share this post

Link to post
Share on other sites

ok, thanks @brian! i will try it and come back here with the result. thanks a lot... i should have know it is the encoding of greek chars... !

Happy New Year !!!!!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By WHMCS John
      An issue has been identified in the 7.5.0 release - published on 2nd April, 2018 - that results in an Oops error when ordering a product via the shopping cart whilst Symantec is enabled in MarketConnect:
      TypeError: Argument 1 passed to WHMCS\MarketConnect\Promotion\Service\ServicePromotion::getAddonArray() must be of the type array, null given, called in /home/whmcs/public_html/75/vendor/whmcs/whmcs-foundation/lib/MarketConnect/Promotion/Service/Symantec.php on line 0 and defined in /home/whmcs/public_html/75/vendor/whmcs/whmcs-foundation/lib/MarketConnect/Promotion/Service/ServicePromotion.php:0  This can result in an inability for clients to place orders.
    • By jamshed_11946
      Hello Guys,
      I changed my whmcs installation location and moved outside public_html folder and now domain pricing feeds have stopped working.
      Check this link for feeds https://hostinpk.com/domains-pricing/
      I contacted WHMCS team and they are not helping further. Is there any chance to get the pricing populated on this page by keeping the whmcs installation folder outside public_html folder.
      I am using this code snippet https://docs.whmcs.com/Data_Feeds#Domain_Pricing_Table
    • By inteldigital
      How do I go about implementing Hotjar's javascript into WHMCS? I'm assuming I cannot just add it into the header.tpl of my theme (Hexa) as it breaks the theme. Here's the code:
      <!-- Hotjar Tracking Code for https://billing.inteldigital.co.uk --> <script> (function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:,hjsv:}; a.appendChild(r); })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); </script> I've tried using {literal} too, which parses the theme, but it doesn't call the JS. Assuming this is what it's purpose is, so what's the solution?
    • By startover909
      I'm on WHMCS 7.5.1. I noticed that the site places a single, minified js file, scripts.min.js, in its header:
      <script type="text/javascript"> var csrfToken = '{$token}', markdownGuide = '{lang key="markdown.title"}', locale = '{if !empty($mdeLocale)}{$mdeLocale}{else}en{/if}', saved = '{lang key="markdown.saved"}', saving = '{lang key="markdown.saving"}', whmcsBaseUrl = "{\WHMCS\Utility\Environment\WebHelper::getBaseUrl()}"; </script> <script src="{$WEB_ROOT}/templates/{$template}/js/scripts.min.js?v={$versionHash}"></script> I'm just wondering if it's safe to move this section to the footer so it does not "render block"? Just tried it on a site under development and seems fine so far at first glance. I wonder if others did the same and if this can potentially cause some issues for WHMCS.
    • By WHMCS Josh
      When it comes time to order a hosting plan, sometimes you don't want your users to be able to enter in a subdomain when using an existing domain for their order.
      In this post I am going to walk you through a basic hook that prevents entering a subdomain by using some client-side JavaScript.
      Our first order of business will be to check out the WHMCS hooks index to see if there is a hook point that will fit our needs: https://developers.whmcs.com/hooks/hook-index/
      It turns out, the ClientAreaFooterOutput hook will do nicely: https://developers.whmcs.com/hooks-reference/output/#clientareafooteroutput
      The reason for this is because that hook point will allow you to inject HTML code, which also can contain JavaScript, into the client-side template so you can make the magic happen.
      Before getting into more detail, let's go ahead and dive right into the code. You can also download it from this link block_subdomains.txt (then rename the extension to .php). Here is the entire snippet:
      <?php add_hook('ClientAreaFooterOutput', 1, function($vars) { $jqueryCode = '<script> $("#owndomainsld").on("keyup", function(e) { var str = $("#owndomainsld").val(); if ( str.indexOf(".") != -1 ) { $("#owndomainsld").val(""); alert("Subdomains are not allowed!"); } }); </script>'; if (strpos($_SERVER['REQUEST_URI'], 'cart.php') !== false ) { return $jqueryCode; } }); The first thing to notice is the add_hook function is being called with the ClientAreaFooterOutput hook point as the first argument and an anonymous function as the second argument. The anonymous function also has a $vars variable being passed into it. For this example the $vars variable is not actually being used in the body of the function, but it does contain some useful parameters should you need to access them. Those parameters can be found in the documentation for the hook point linked above.
      The next thing to notice is the $jqueryCode variable. which is actually a PHP string that contains the JavaScript code we will be injecting into our client-side page. Since WHMCS uses the jQuery JavaScript library and loads it on the page, we can use it in our code.
      First, we need to bind an event listener to the keyup event on the domain text box and provide it a callback function to execute when that event occurs. This can be easily done by targeting the element's HTML ID attribute. That is what is happening here:
      $("#owndomainsld").on("keyup", function(e) {... After that, the value of the domain text field is stored in a JavaScript variable called str. Since this code is inside our callback function, it will be executed every time the user presses a key on the keyboard and then releases it:
      var str = $("#owndomainsld").val(); Once we have that text stored in our str variable, we need to check it for a dot or period '.' character to see if it is a subdomain.
      This can be done with indexOf string function in JavaScript. If the text appears to be a subdomain, we'll go ahead and empty out the text field and then show an alert to the user to let them know that subdomains are not allowed:
      if ( str.indexOf(".") != -1 ) { $("#owndomainsld").val(""); alert("Subdomains are not allowed!"); } Finally, the last part of the hook does a case-insensitive string search on the $_SERVER['REQUEST_URI'] (the URL of the page you're visiting), to check and see if a cart page is being rendered. If a cart page is detected, the JavaScript code is injected into that page so it can run.
      if (strpos($_SERVER['REQUEST_URI'], 'cart.php') !== false ) { return $jqueryCode; } Putting it all together, we get the final results in WHMCS which look like the picture here:

      I hope this post proved helpful and gives some insight on some of the ways that WHMCS can be extended to do many different things outside the box! 
      At the time of writing this post, this hook was tested on the latest stable release of WHMCS 7.4.2 and should work with any that fall under Active Support as per the LTS schedule here: https://docs.whmcs.com/Long_Term_Support#WHMCS_Version_.26_LTS_Schedule
      If you have any feedback, questions, or concerns that I did not cover in this post, please feel free to reach out!
  • Recently Browsing   0 members

    No registered users viewing this page.


Important Information

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