Jump to content
stormy

Don't hide domain matrix after a domain search

Recommended Posts

I have several search forms outside WHMCS that post to the now-gone domainchecker. I am looking for a way to keep the domain matrix with all the TLDs and prices on sight after a domain search. If customers hit the domain results from another page, they don't even know which TLDs are available.

And if I'm using suggestions from the new domainspinner, it doesn't even list my available TLDs and goes straight for suggestions.

By the way, I like the new domain search page, domain spinner, featured TLDs, everything. I think it's a huge advance, and I'd love to be able to customize some more stuff in there, like the categories, which can't even be translated...

Share this post


Link to post
Share on other sites
18 hours ago, stormy said:

I have several search forms outside WHMCS that post to the now-gone domainchecker. I am looking for a way to keep the domain matrix with all the TLDs and prices on sight after a domain search. If customers hit the domain results from another page, they don't even know which TLDs are available.

it's using jQuery to hide the matrix div and show the results/suggestions instead - so you'd need to alter that jQuery if you want to show both.

alternatively, you could edit domainregister.tpl and rename...

<div class="domain-pricing">

to "domain-pricing2" and that would stop the jQuery hiding the matrix and the table would be shown after the results... though you'd then have to remember to copy the .domain-pricing css from your template .css file, paste them into a custom.css and rename them to from .domain-pricing to .domain-pricing2 to maintain the style.

FWR6gE9.png

18 hours ago, stormy said:

By the way, I like the new domain search page, domain spinner, featured TLDs, everything.

I assume that you're using "new" in the sense of new to you - because what you're seeing has been like this for years!

18 hours ago, stormy said:

I'd love to be able to customize some more stuff in there, like the categories, which can't even be translated...

they can - though I don't believe that it's mentioned in the docs anywhere. 🙄

I can remember posting code back in April 2015, which I assume was in a v6 beta board because I can't find the thread, but kept a local copy of the code.. that was basically a neat Smarty IF statement that checked for language overrides - but in recent versions, the domainregister template is coded to use language translations for the TLD Categories if they exist... although none of been created in the language files by default, so you wouldn't know unless you examined the code and could see what it was trying to do.

<a href="#" data-category="{$category}" class="label label-default">{lang key="domainTldCategory.$category" defaultValue=$category} ({$count})</a>

which means that you can create Language Overrides for the categories that you want to translate - any that you don't want to translate, don't make overrides for.

so let's say we edit/create the /lang/overrides/french.php file (with apologies for any French-speakers!)...

<?php
$_LANG['domainTldCategory']['Popular'] = "Populaire";
$_LANG['domainTldCategory']['gTLD'] = "Général";
$_LANG['domainTldCategory']['ccTLD'] = "Des pays";
$_LANG['domainTldCategory']['Business'] = "Affaires";
$_LANG['domainTldCategory']['Leisure and Recreation'] = "Loisir";

9w2F1vC.png

there is also a domain-pricing.tpl template, but for the life of me, I can't recall how to view it - there's a vague memory, from one of the v7 beta forums, that it's called using index.php?rp=xxx - but can't think what xxx is.... it was mentioned only once, in passing, by a WHMCS staff member and again I don't think it's listed in the docs... so if anyone else knows, do let me know as it's bugging me that I can't remember it! 😠

Share this post


Link to post
Share on other sites

Thanks for all the great info, Brian! As for domain-pricing.tpl, I tried calling it with an include it in the clientarea and in a cart page, and it didn't work. I'll go for the domain-pricing2 solution since I couldn't find a way to alter the jQuery from that page, and I don't want to mess with the main file.

Share this post


Link to post
Share on other sites
9 minutes ago, stormy said:

As for domain-pricing.tpl, I tried calling it with an include it in the clientarea and in a cart page, and it didn't work.

they're still updating the template, so it must do something... maybe its cart.php or clientarea.php that calls it... I wish I could remember! 🙄

Share this post


Link to post
Share on other sites

with grateful thanks to @WHMCS Nathan for confirming this to me privately, the full domain pricing page can be accessed via...

40 minutes ago, WHMCS Nathan said:

This page can be reached directly via the "domain/pricing/" route-path.

Depending on the "Friendly URLs" setting it could be accessed via one of the following URL examples:

Full Friendly Rewrite: https://www.yourdomain.tld/domain/pricing
Friendly index.php: https://www.yourdomain.tld/index.php/domain/pricing
Basic URLs: https://www.yourdomain.tld/index.php?rp=/domain/pricing/

- that was about the only combination of folder path that I didn't try! 🙂

both grace / redemption period columns are empty in my dev - so I don't know if that's a bug or if i'm missing something... it would probably be fixable with a hook if necessary.

anyway, hopefully the full domain pricing table will be of use to others. thanks.png

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, brian! said:

both grace / redemption period columns are empty in my dev - so I don't know if that's a bug or if i'm missing something... it would probably be fixable with a hook if necessary.

anyway, hopefully the full domain pricing table will be of use to others. thanks.png

Wow that is one pretty looking pricing table!!! Mine has the grace/redemption periods as well as the fees. Very neat!

Share this post


Link to post
Share on other sites
15 hours ago, stormy said:

Wow that is one pretty looking pricing table!!! Mine has the grace/redemption periods as well as the fees. Very neat!

a thought occurred to me last night which i've just confirmed - I had Grace & Redemption Fees disabled in general settings and that's why they weren't shown.... so on one hand it makes sense under those circumstances that the fees aren't shown; yet on the other hand, if i'm not charging fees, why show those two columns at all?

I think it would just need a hook to get the G/R Fees setting from the database and then two IF statements (one for headings, another for the data) in the template to show those two columns based on the hook value.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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