Results 1 to 6 of 6

Thread: multiple tld domainchecker.tpl

  1. #1
    Join Date
    Aug 2008
    Posts
    73

    Default multiple tld domainchecker.tpl

    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

  2. #2
    Join Date
    Mar 2012
    Location
    Sheffield, UK
    Posts
    26

    Default

    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.

  3. #3
    Join Date
    Aug 2008
    Posts
    73

    Default

    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.

  4. #4
    Join Date
    Mar 2012
    Location
    Sheffield, UK
    Posts
    26

    Default

    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>

  5. #5
    Join Date
    Mar 2012
    Location
    Sheffield, UK
    Posts
    26

    Default

    Or are you looking to go from a form on another page to domainchecker.php and submit the tld along with that form?

  6. #6
    Join Date
    Aug 2008
    Posts
    73

    Default

    Quote Originally Posted by ipgeek-lg View Post
    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.

Similar Threads

  1. domainchecker.tpl wrong way around...
    By EZi in forum Customisation & Integration Questions
    Replies: 0
    Last Post: 11-20-12, 02:10 AM
  2. domainchecker.tpl
    By InteraNetworks in forum Customisation & Integration Questions
    Replies: 2
    Last Post: 04-15-10, 01:57 AM
  3. Modify domainchecker.tpl
    By panky23 in forum Customisation & Integration Questions
    Replies: 0
    Last Post: 01-11-09, 09:05 PM
  4. same tld multiple registrars?
    By josemv in forum Pre-Sales Questions
    Replies: 2
    Last Post: 10-27-07, 11:44 AM