graisbeck Posted June 29, 2017 Share Posted June 29, 2017 (edited) Has anyone come up with a solution to the sorting of the TLD's in either the front end domain checker dropdown or the domain pricing table (as this seems to control the overall sorting of the front end dropdown)? Even though I imported the TLD's with selling price alphabetically, the end result sorting is still random. Thanks in advance. Edited June 30, 2017 by graisbeck 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 30, 2017 Share Posted June 30, 2017 Has anyone come up with a solution to solve the sorting of the TLD's in either the front end domain checker dropdown or the domain price table (as this seems to control the overall sorting of the front end dropdown)?Even though I imported the TLD's with selling price alphabetically, the end result sorting is so random. the correct way to sort them would be via the domain pricing page - https://docs.whmcs.com/Domain_Pricing#Re-ordering_TLDs Reordering TLDs is simply a drag & drop process Position your mouse over the up/down arrows on the row you want to move, click+hold and then drag up or down Once it is where you want it to be, let go of the mouse button to assign it. that would be the best way to do it - it might take some time if you have a LOT of TLDs to resort so plump up a cushion, make yourself a cup of tea and get stuck in... in the long-run, it will beneficial to spend the time doing this. but if it's time critical issue, then you can tweak it in the template with one line of Smarty... for the sake or argument, let's assume that you're using Modern and thinking specifically of the domain registration page, e.g adddomain.tpl and change... <select name="tld" id="inputTld" class="form-control input-lg"> {foreach from=$tlds item=listtld} <option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}> {$listtld} </option> {/foreach} </select> to... <select name="tld" id="inputTld" class="form-control input-lg"> {$tlds|@sort:$smarty.const.SORT_LOCALE_STRING} {foreach from=$tlds item=listtld} <option value="{$listtld}"{if $listtld eq $tld} selected="selected"{/if}> {$listtld} </option> {/foreach} </select> that method should work in all templates (including Modern, Standard_Cart and customs too). although you could potentially resort the arrays using action hooks too, there are multiple arrays with different names used in different templates... so by the time you've covered all eventualities, you might as well have just spent the time resorting them via the domain pricing page! btw - if your website is the one that i'm currently looking at and shares the name of a former Prime Minister from over a century ago(!), then I think you have a problem with your IDN TLD imports (e.g the final 7 on the dropdown) as WHMCS won't support TLDs entered in that way - do a search with them and you'll see an error message... "The domain you entered is not valid. Enter only the part after the www. and include the TLD". the quick fix would just be to remove them (unless you're going to specifically target those markets), or convert them from unicode to ascii and use that in the domain pricing page. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.