Jump to content


Honored Contributor
  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by brian!

  1. if you're hardcoding a price in the template, that that explains it. 🙂 can you use a Data Feed to get the price ? if so, then you can get it to use the currency selected in the header... if this is a WHMCS page, then you could also use a hook to return the value from the database based on the chosen currency, but data feeding might be simpler for you in your situation.
  2. you could use $locales.languageCode if you wanted to make the images filenames 2 characters, e.g ar.png, az.png etc. language will always be in lowercase English, whereas localisedName could be using characters from that language - which might prove difficult for some filenames... so for simplicity, I thought it easier, and more consistent to just use the language name.
  3. do you mean.... ? it's just the same principle as with the currencies.... {if $languagechangeenabled && count($locales) > 1} <li> <a href="#" class="choose-language" data-toggle="popover" id="languageChooser"> {$activeLocale.localisedName} <b class="caret"></b> </a> <div id="languageChooserContent" class="hidden"> <ul> {foreach $locales as $locale} <li><a href="{$currentpagelinkback}language={$locale.language}"><img src="{$BASE_PATH_IMG}/newflags/{$locale.language|strtolower}.png"> {$locale.localisedName}</a> </li> {/foreach} </ul> {if !$loggedin && count($currencies) > 1} <ul> {foreach from=$currencies item=currchoice} <li><a href="{$currentpagelinkback}currency={$currchoice.id}"><img src="{$BASE_PATH_IMG}/newflags/{$currchoice.code|substr:0:3|strtolower}.png"> {$currchoice.code}</a></li> {/foreach} </ul> {/if} </div> </li> {/if} ... except this time you'll need to create image files with the name of the language in lowercase, e.g french.png, english.png etc choosing an "appropriate" icon for each - in the above screenshot, they're 16px images. annoyingly, the icons can throw off the alignment for those languages with long names, e.g Nederlands and Macedonian (Nederlands is out by 1px!)... ... the solution to that would be a tweak of the CSS padding of that element in a custom.css or hook... .language-popover .popover-content li { padding: 0 20px 0 36px !important; } ... and if you were logged in, the currencies wouldn't be shown. they wouldn't, $currency only exists on cart pages - on these custom pages, how are you displaying the prices ?
  4. you're in it 😜 one day i'll do it myself... my greatest hits collection. 🤪 I would have thought it should still work, just as long as what WHMCS had as the department name was what you were checking for. I don't think v8.1 likes how the hook is trying to access the department value from the template... can they reply ? assuming the answer to that question is yes, then... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { GLOBAL $smarty; $departmentid = $smarty->getVariable('departmentid'); $status = $smarty->getVariable('status'); $validdepts = array(4,7); $statuslabel = Lang::trans('supportticketsstatusonhold'); if (in_array($departmentid,$validdepts) && strpos($status,$statuslabel) !== false) { $footer = '<div><button class="btn btn-success btn-sm btn-block" onclick="jQuery(\'#ticketReply\').click()"><i class="fas fa-pencil-alt"></i> '.Lang::trans('supportticketsreply').'</button></div>'; if (!is_null($primarySidebar->getChild('Ticket Information'))) { $primarySidebar->getChild('Ticket Information')->setFooterHtml($footer); } } }); which basically says, if dept is either 4 or 7 AND the status of the ticket is on hold, then do something - in this case, modify the footer...
  5. if I use stargate (which I think should be the same as resellerclub), it's telling me the above usa domains are all unavailable.
  6. it was taken from the v8.1 version of standard_cart/domainregister.tpl, so it definitely works if you're inside the pricing table loop. you mean pricing within WHMCS? so does the above page... the problem I had was I didn't recognise where <span class="pricing"> is used (because it's not in v8.1 - or 8 or v7.10 I think - so I wasn't sure how far you were going back or whether you were talking about the pricing table, or when it returns a price after a search? just checked and $tldpricing doesn't exist... perhaps open a {debug} in the template to see what's available.
  7. have you tried resetting the template to Six to see if it's an issue with the Allure template ?
  8. are you using Namespinning as the lookup provider? if so, you could argue this is a bug with eNom (which runs Namespinning) as usa.info is a reserved domain (so cannot be registered), and usa.online is premium ($12k per year) - WHMCS will just be responding to what it's receiving from the API. it might be worth opening a support ticket as they might have a greater influence if the error is with what eNom is returning. if you get your license directly from WHMCS (login required) - https://www.whmcs.com/support/ if you get your license from a reseller / host (no login required) - https://www.whmcs.com/reseller-support/
  9. I don't think that https://www.whmcs.com/members/index.php?m=licensing has recaptcha enabled on it (so far!), so that might be an alternative form to try to access. though it might be worth opening a ticket in case WHMCS has an alternate way to do this.
  10. you shouldn't need to use math equation in Smarty3 - once you make it a number, you should be able to perform calculations on it directly... e.g in the pricing table... {(((current($price.register)|replace:',':'.')*1.17)|number_format:2)} .... would take the registration price for a TLD, multiply it by 1.17 (add 17%) and set it to 2 decimal places... I supposed you might then need to add the currency prefix/suffix vack to the output.
  11. I think their pricing depends on where you are, e.g whether you're in the EU or not -150 NOK (out) or 178 (in)... and whether you're getting their public prices or reseller pricing. they write their own free WHMCS modules, regularly updated and not encrypted - their support is supposed to be pretty good too. https://wiki.hexonet.net/wiki/WHMCS_Modules as with all third-party modules, give them a few days before updating WHMCS (especially for a major update, e.g v8.2, v8.3 etc) just to give Hexonet a chance to make any necessary changes to their code.
  12. when you say "them", do you mean that you want to remove the categories from the page ? because the solution on this page is to show ALL TLDs by default, not just the "Popular" ones... and your site is now doing this because you made the above change. then to remove categories from the page, you can use CSS in a custom.css file - in your case, that would be in /templates/six/css/custom.css - just remember that WHMCS will overwrite this during an update, so keep a backup copy. .tld-filters {display: none;} note - this would remove the filters from both the domain registration page, and the separate domain pricing page (domain.com/domain/pricing)... if you wanted to remove the category column from the table above, then I think the simplest way would be to use CSS again... table#tableDomainPricing td:nth-child(2), table#tableDomainPricing th:nth-child(2) {display: none;} you could do both changes as a hook if you wanted to - should work in Six or 21 (or child themes of either)... <?php # Remove Domain Categories Hook # Written by brian! function remove_domain_categories_hook($vars) { $validtemplates = array("domainregister","domain-pricing"); if (in_array($vars['templatefile'],$validtemplates)) { $head_return = "<style>.tld-filters {display: none;} table#tableDomainPricing td:nth-child(2), table#tableDomainPricing th:nth-child(2) {display: none;}</style>"; return $head_return; } } add_hook("ClientAreaHeaderOutput",1,"remove_domain_categories_hook"); there would also be an issue with the "Browse Categories" heading text - but that won't be affecting you as you've modified the string using Language Overrides in the Spanish file... additionally, there might be a layout issue on the domain pricing page with multiple currencies, but that's not an issue for you. btw - if your issue with the domain categories is that they're in English, then you can translate them to Spanish (and other languages) using Language Overrides if you want to...
  13. not easily - it's not using an email template and is hardcoded within WHMCS. simplest solution might be to use a support department instead of the contact form.
  14. invisible recaptcha requires a different key than v2 recaptcha... https://docs.whmcs.com/Google_reCAPTCHA#Enabling_Invisible_reCAPTCHA
  15. can't you contact the company you're reselling for to get that information ? didn't you check first being adding your pricing to the site ??
  16. any chance that client is inactive and they're just hidden from the list of clients by default ?
  17. technically, you could change it with Language Overrides... $_LANG['ordererrordomaininvalid'] = "The domain you entered is not valid - contact us for assistance."; if you needed a link in there, you might need a hook... cos although you can add links in overrides, I don't think the cart can use them in the same way as outside of the cart.
  18. literally, it's just copy & paste into the header.tpl wherever you want to show the currency dropdown... {if $languagechangeenabled && count($locales) > 1} <li> <a href="#" class="choose-language" data-toggle="popover" id="languageChooser"> {$activeLocale.localisedName} <b class="caret"></b> </a> <div id="languageChooserContent" class="hidden"> <ul> {foreach $locales as $locale} <li> <a href="{$currentpagelinkback}language={$locale.language}">{$locale.localisedName}</a> </li> {/foreach} </ul> </div> </li> {/if} {if !$loggedin && count($currencies) > 1} <li> <a href="#" class="choose-currency" data-toggle="popover" id="currencyChooser" data-container="body" data-placement="bottom" data-content='{foreach from=$currencies item=currchoice}<div class="col-md-4"><img src="{$BASE_PATH_IMG}/newflags/{$currchoice.code|substr:0:3|strtolower}.png">&nbsp;<a href="{$currentpagelinkback}currency={$currchoice.id}">{if $currency.id eq $currchoice.id}<u>{/if}{$currchoice.code}</u></a></div>{/foreach}<br><br>'><i class="fal fa-sack-dollar"></i> <b class="caret"></b></a> </li> {/if} I suspect the biggest issue you might run into is the icons - because I have HRK & RON as currencies in my dev, using the default icons wouldn't really work and I don't like mix & matching icon sets - so it was easier to obtain a free icon flag pack online (plenty available) and use them in a custom directory so that the flags look consistent (and WHMCS wouldn't overwrite them)... then it's a case of renaming the image filenames to suit the currency to 3 letters, e.g GBP is gbp.png, USD is usd.png and so on. however, if you only use currencies for which WHMCS already has flag icons, then these can be used if you wish... <img src="{$BASE_PATH_IMG}/newflags/{$currchoice.code|substr:0:3|strtolower}.png"> becomes... <img src="{$BASE_PATH_IMG}/flags/{$currchoice.code|substr:0:2|strtolower}.png"> by making the following change to header.tpl... {if $languagechangeenabled && count($locales) > 1} <li> <a href="#" class="choose-language" data-toggle="popover" id="languageChooser"> {$activeLocale.localisedName} <b class="caret"></b> </a> <div id="languageChooserContent" class="hidden"> <ul> {foreach $locales as $locale} <li> <a href="{$currentpagelinkback}language={$locale.language}">{$locale.localisedName}</a> </li> {/foreach} </ul> {if !$loggedin && count($currencies) > 1} <ul> {foreach from=$currencies item=currchoice} <li><a href="{$currentpagelinkback}currency={$currchoice.id}"><img src="{$BASE_PATH_IMG}/newflags/{$currchoice.code|substr:0:3|strtolower}.png"> {$currchoice.code}</a></li> {/foreach} </ul> {/if} </div> </li> {/if} you could, if you wanted to, link the languages to currencies so that a link changed both, but often there isn't a simple relationship between the two, e.g do you link English to GBP, USD, AUD, NZD etc? do you link French to EUR or CAD (for Canadian French users) ?? and then you have the issue of logged in users not being able to change currencies (which you could get around with an IF statement to check their not logged in before changing currencies - though WHMCS would not allow you to change currencies when logged in anyway). I suspect you could make it work if you had to, but just pasting a BS4 template code into BS3 isn't going to work - additionally, there may be CSS classes that need defining in Six... the above solution would be simpler. 🙂
  19. looking at your site, it seems to be working fine - so perhaps it was just a cacheing issue? 🙂
  20. not disabled - just a full mailbox... the price I willingly pay for resigning from the pointless GearHead rank many years ago when I got sick of the pathetic intimidation a certain staff member tried to impose... 😎 try sending again.
  21. of the big registrars, Hexonet pricing would start at around the $21 (178.50 NOK) and then reduce to $17.5 (148.75 NOK) depending on number of domains involved. it might be worth contacting @ptomter as i'm sure he created one many years ago, but don't know if he ever made it available publicly.... also, I know he sells his .no domains for 150 NOK, so he might be in a better position to advise about preferable .no registrars than me. 🙂
  22. for the record, I meant that I don't see it locally on my dev - I do see it on yours in FF. 🙂 my suspicion is that this is related to Sales Groups in some way - whether that's because the language strings are missing; there is a JS issue or some template tweak occurring, the source code looks like it's trying to use a language string that doesn't exist and so it's just displaying "domainCheckerSalesGroup" with .sarl in the spotlight output - is it in it's own sales group? if so, what happens if you remove it from the group ?? Namespinner is really just eNom, so if it's a TLD that eNom doesn't resell, then WHMCS will fall back to using whois - and it's possible that some European TLDs whois server entries might be missing from the dist.whois.json file. or you're going to run into whois lookup limits for a particular TLD - the most obvious example being .nl which I think only allows 15 lookups per day from unregistered IPs and your site must have hit that limit because it's reporting all .nl domains as unavailable (even when they are).
  23. how many .uk domains are you talking about ?? would it be worth joining Nominet ??
  24. in v7.10, I wrote the hook in the thread below.. it looks like for v8.1, it should be... <?php # Cart Sidebar Removal / Resizing v8.1 Hook # Written by brian! function cart_remove_sidebars_hook($vars) { $validtemplates = array("domainregister"); if ($vars['inShoppingCart'] && !in_array($vars['templatefile'],$validtemplates)) { $head_return = "<style>#order-standard_cart .cart-body { width:100% !important; } .cart-sidebar {display: none;}</style>"; return $head_return; } } add_hook("ClientAreaHeaderOutput",1,"cart_remove_sidebars_hook"); with this, there should be no need for a hook to remove the sidebar as they're being hidden via CSS - the only line you should need to change is the $validtemplates array which defines which cart templates (if any) should show the sidebars.
  • 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