CCSupport Posted May 9, 2014 Share Posted May 9, 2014 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! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 10, 2014 Share Posted May 10, 2014 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! 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. 1 Quote Link to comment Share on other sites More sharing options...
searley Posted May 10, 2014 Share Posted May 10, 2014 (edited) Check how I have done it at http://www.strongnet.co.uk It can be done with the standard checker just by modifying the search you send to it Mine searches multiple domains just check the html from the search box on the link above Edited May 10, 2014 by searley 1 Quote Link to comment Share on other sites More sharing options...
CCSupport Posted May 10, 2014 Author Share Posted May 10, 2014 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! 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted May 14, 2014 Share Posted May 14, 2014 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 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.