WIS hosting Posted July 12, 2012 Share Posted July 12, 2012 Hi, in version 5.0.3 the domainchecker.php checks for only 1 tld and returns if that is available. You can click the button to select multiple tld's. But I would like to offer the clients immediatly a few more tld's that are also available. The strange thing is that this works alright in the ordering template, because you can select in the whmcs backend > Setup > general settings > domains > bulk domain check for more tld's. So why doesnt it work for the domainchecker? anyways: whmcs support said: You can edit the domainchecker.tpl file and check the boxes automatically for your popular extensions. I have seen the section of which I think it should be placed there (dont know if I am allowed to post it here, so i don't). But I don't know how to change the code so that it checks multiple domains. Can anyone help me out? thanks 0 Quote Link to comment Share on other sites More sharing options...
ipgeek-lg Posted July 12, 2012 Share Posted July 12, 2012 Hi WIS Hosting, This is how I got this done in my domainchecker.tpl file <div class="hidden"> {foreach from=$tldslist key=num item=listtld} <input type="checkbox" name="tlds[]" value="{$listtld}" checked> {/foreach} </div> This creates a hidden div and pops the check boxes in with them ticked to make sure all domains are selected. Check out how this behaves at https://ipgeek.co.uk/domainchecker.php NB. Make sure you put this code inside the "form" tag on this template file. 0 Quote Link to comment Share on other sites More sharing options...
WIS hosting Posted July 12, 2012 Author Share Posted July 12, 2012 Thanks Ipgeek-lg, that looks like it. I have integrated it now in my template and as you already said it checks ALL boxes. I am looking for a peace of code that only checks a few boxes that I desire. Because I have 40 domains in the check, that would be too much. Another thing that I noticed: When the client is in the clientareahome screen and uses the domainchecker it gets redirected to domainchecker.php But then it only displays the requested domainname and not the other tld's that i used. Hope someone can help me with these 2 issues. 0 Quote Link to comment Share on other sites More sharing options...
ipgeek-lg Posted July 12, 2012 Share Posted July 12, 2012 Well if you only want it to do it with a few domains you could do this: <div class="hidden"> <input type="checkbox" name="tlds[]" value=".co.uk" checked> <input type="checkbox" name="tlds[]" value=".org.uk" checked> <input type="checkbox" name="tlds[]" value=".com" checked> <input type="checkbox" name="tlds[]" value=".net" checked> </div> But it depends what you want to do with it. Another solution could be to use a GET variable. say like this <div class="hidden"> {if $smarty.get.tldgroup == 'uk_domains'} <input type="checkbox" name="tlds[]" value=".co.uk" checked> <input type="checkbox" name="tlds[]" value=".org.uk" checked> {elseif $smarty.get.tldgroup == 'us_domains'} <input type="checkbox" name="tlds[]" value=".com" checked> <input type="checkbox" name="tlds[]" value=".gov" checked> {/if} </div> This way you can link to domainchecker.php?tldgroup=uk_domains and this will render as: <div class="hidden"> <input type="checkbox" name="tlds[]" value=".co.uk" checked> <input type="checkbox" name="tlds[]" value=".org.uk" checked> </div> 0 Quote Link to comment Share on other sites More sharing options...
ipgeek-lg Posted July 12, 2012 Share Posted July 12, 2012 Or are you looking to go from a form on another page to domainchecker.php and submit the tld along with that form? 0 Quote Link to comment Share on other sites More sharing options...
WIS hosting Posted July 16, 2012 Author Share Posted July 16, 2012 Or are you looking to go from a form on another page to domainchecker.php and submit the tld along with that form? Sorry for the slow response, but that is actually what I mean. I have a searchbox on the frontpage of the clientsystem. that one redirects to the domainchecker.php page. And should display the most popular domains for me and not just the one that is asked for by the client. 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.