Jump to content

Search Multiple Domains - Auto populate top four? / Domain


Recommended Posts

Hello all,

 

I am trying to clean up our WHMCS site and make things a little more streamlined....

 

I have two things....one thing I would like to do is auto check say the first four domain TLD boxes when a client searches a domain. Currently they are required to tick each box but only after clicking on the 'Search Multiple TLDs' action.

 

I understand the implications to just search all potential domains but having a few auto selected would be great.

 

The second thing still regarding domains is an weird one! If a logged in client clicks on Register a New Domain (https://www.domain.com/cart.php?a=add&domain=register) it asks for the domain but then shows the other TLDs that they can purchase.....this does not show up if a client is not logged in as the only domain registration availabile is 'domainchecker.php' and that just shows the domain chosen unless the extra boxes are ticked. I have attached a screenshot to show what I mean.

 

Any advice with these would be great!

 

otherdomains.PNG

 

showsonly1.PNG

Link to comment
Share on other sites

I am trying to clean up our WHMCS site and make things a little more streamlined....

 

I have two things....one thing I would like to do is auto check say the first four domain TLD boxes when a client searches a domain. Currently they are required to tick each box but only after clicking on the 'Search Multiple TLDs' action.

 

I understand the implications to just search all potential domains but having a few auto selected would be great.

I made some tweaks to my domainchecker this morning to test whether this can be done... and it can! :idea:

 

using the modified domainchecker, discussed in the thread below, we just need to specify an array that contains a list of TLDs that you wanted to be automatically checked (e.g .co.uk, .com, .net etc)... domainchecker.tpl is then modified to tick the appropriate TLD boxes in the 'Search Multiple TLDs' dropdown, and tick these same TLD boxes in the available results section.

 

- http://forum.whmcs.com/showthread.php?87250-Group-domain-extensions-%28TLDs%29-in-domain-checker

 

i've not had a chance to work on this this week, but the code has progressed significantly since I pasted my original musings on the topic in the above thread.

 

ultimately, when I get the time, I intend to share the modified files on my github page and post the basic solution here - but as there are three different domainchecker.tpl templates (classic, default and portal) to modify and test, along with the 8 order-form templates... I don't want to post anything publically until its thoroughly tested - though there are other WHCMS users using an early version of this code on their live sites.

 

you can drop me a PM if you're interested about this - if you're using a custom theme, I may need to see your domainchecker.tpl file.

 

The second thing still regarding domains is an weird one! If a logged in client clicks on Register a New Domain (https://www.domain.com/cart.php?a=add&domain=register) it asks for the domain but then shows the other TLDs that they can purchase.....this does not show up if a client is not logged in as the only domain registration availabile is 'domainchecker.php' and that just shows the domain chosen unless the extra boxes are ticked. I have attached a screenshot to show what I mean.

unless you've modified your order form templates, there is a second route to registering domains - you can go to "Register Domain" from the cart, using the same link you mention above - it should work the same whether they are logged in or not.

 

the "other domains you might be interested in" list in defined in the admin area..

 

setup -> general settings - domains -> Bulk Check TLDs

 

any tlds you highlight in that list will also be searched for when using this page...

 

I would imagine, though I haven't specifically tested it!, that this template could also be tweaked to search and tick the same tlds that are used in domainchecker... in fact, having modified it in the above thread, i'm pretty sure it would.

Link to comment
Share on other sites

Brian - You are becoming a legend ;-)

 

Seriously, great work! Just reading the linked thread....lots of useful information.

 

I am VERY interested in getting this integrated into our site. We have a modified order form template so will be interesting to see the results, especially as we also use a Zomex frontend theme which has also been modified!

 

I will PM you so that I can grab a PayPal donation address shortly! ;)

Link to comment
Share on other sites

in domainchecker.tpl you'll have a line like...

<input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds)} checked{/if}>{$listtld}</td>

which ISTR 'ticks' it for those in the bulkcheck array

 

change that to

{if in_array($listtld, $yourArrayOfTLDs)}
<input type="checkbox" name="tlds[]" value="{$listtld}" checked{/if}>{$listtld}</td>
{else}
<input type="checkbox" name="tlds[]" value="{$listtld}"{if in_array($listtld,$tlds)} checked{/if}>{$listtld}</td>
{/if}

 

And it'll also 'tick' the box for the items in your array (subject to you setting values in there obviously)

 

We use this for colouring them based on various checks at https://www.astutium.com/domainchecker.php

Link to comment
Share on other sites

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