Jump to content

Show all TLD extensions?


LadyNin

Recommended Posts

Hi,

After much searching I am none the wiser on how to have WHMCS show ALL TLD extensions on the Register Domain page (screenshot attached). I have 9 extensions available but it only initially shows four. Customers will have to click all "Browse extensions by category" tabs to see all 9 domains. I have found older threads with suggestions that are no longer relevant for this but nothing recent. Any advice / assistance much appreciated.

Thanks,

LadyNin

show-all-categories.jpg

Link to comment
Share on other sites

On 12/09/2019 at 06:01, LadyNin said:

After much searching I am none the wiser on how to have WHMCS show ALL TLD extensions on the Register Domain page (screenshot attached). I have 9 extensions available but it only initially shows four. Customers will have to click all "Browse extensions by category" tabs to see all 9 domains. I have found older threads with suggestions that are no longer relevant for this but nothing recent. Any advice / assistance much appreciated.

the template change below will still work in v7.8.2

if you modify domainregister.tpl and change...

    jQuery('.tld-filters a:first-child').click();

to...

    jQuery('.tld-filters a:*').click();

... then all TLDs should be shown by default. 🙂

Link to comment
Share on other sites

  • 7 months later...

Hi @honesting

10 minutes ago, honesting said:

Do you know how to do it in 7.9.1 ? I found that now the file with the search is: domain-pricing.tpl 

nothing has changed in v7.9.1 and the above code will still work in the domainregister.tpl template - which is still the one used for domain searches...

qiggycs.png

domain-pricing.tpl is the template for the separate page that shows the TLD prices, e.g domain.com/domain/pricing/

i1TIorO.png

on the separate domain pricing page, if you want to show ALL TLDs by default, then you could edit domain-pricing.tpl and change...

{include file="$template/includes/tablelist.tpl" tableName="DomainPricing" noOrdering=true}

to...

{include file="$template/includes/tablelist.tpl" tableName="DomainPricing" noOrdering=true noPagination=true}
Link to comment
Share on other sites

  • 8 months later...
On 4/16/2020 at 10:42 AM, brian! said:

Hi @honesting

nothing has changed in v7.9.1 and the above code will still work in the domainregister.tpl template - which is still the one used for domain searches...

qiggycs.png

domain-pricing.tpl is the template for the separate page that shows the TLD prices, e.g domain.com/domain/pricing/

i1TIorO.png

on the separate domain pricing page, if you want to show ALL TLDs by default, then you could edit domain-pricing.tpl and change...


{include file="$template/includes/tablelist.tpl" tableName="DomainPricing" noOrdering=true}

to...


{include file="$template/includes/tablelist.tpl" tableName="DomainPricing" noOrdering=true noPagination=true}

wow Brian

you are so helpful here, WHMCS should pay you for these

Link to comment
Share on other sites

On 12/01/2021 at 09:27, hoya8 said:

you are so helpful here, WHMCS should pay you for these

they couldn't afford me! 💵

On 12/01/2021 at 09:31, hoya8 said:

ohoh this fix seem not working on WHMCS 8.1

the above domain pricing table fix still works in v8.1 - noPagination=true .... as does the jQuery change on domain-register.tpl - both tested on Six, 21 & Standard_cart... if you're using custom carts and/or themes, then it may or may not work.

Link to comment
Share on other sites

2 hours ago, honesting said:

I still see them with 2 browsers.

when you say "them", do you mean that you want to remove the categories from the page ?

YY4FoaV.png

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.

2 hours ago, honesting said:

Support told me how to remove TLDs from one category but I don't want to use the categories system.

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)...

wyMYGve.png

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...

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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