Jump to content

Orderform - configuredomains.tpl - Nominet domains


Chris74

Recommended Posts

Hi, I was wondering if anyone has produced some better form validation for Nominet domains on the "configure domains" page.

 

Currently if you choose a registrant type that requires a company number, you can leave the company number empty - which will cause the registration to fail. I'm also struggling to find a way to add extra text to this form, or in fact modify the form at all. There are no TLD or registrar specific sections in the template. Is the Nominet configuration form hard coded, or does it appear in a file somewhere that I've missed?

 

Also, I notice on this page that for each domain, whether it is a transfer or a registration, it simply lists the domain and then the number of years- i.e mydomain.com 1 Year/s. I'd like to change this to say Domain Registration mydomain.com 1 Year/s or Domain Transfer mydomain.com 1 Year/s. Can anyone possibly help me with the correct syntax to use in an IF statement to differentiate between a transfer and a registration in order to display that text?

Edited by Chris74
Link to comment
Share on other sites

Hi, I was wondering if anyone has produced some better form validation for Nominet domains on the "configure domains" page.

 

Currently if you choose a registrant type that requires a company number, you can leave the company number empty - which will cause the registration to fail. I'm also struggling to find a way to add extra text to this form, or in fact modify the form at all. There are no TLD or registrar specific sections in the template. Is the Nominet configuration form hard coded, or does it appear in a file somewhere that I've missed?

the additional fields for tlds are configurable (to a degree) in the "includes/additionaldomainfields.php"...

 

// .UK

$additionaldomainfields[".co.uk"][] = array("Name" => "Legal Type", "LangVar" => "uktldlegaltype", "Type" => "dropdown", "Options" => "Individual,UK Limited Company,UK Public Limited Company,UK Partnership,UK Limited Liability Partnership,Sole Trader,UK Registered Charity,UK Entity (other),Foreign Organization,Other foreign organizations", "Default" => "Individual",);
$additionaldomainfields[".co.uk"][] = array("Name" => "Company ID Number", "LangVar" => "uktldcompanyid", "Type" => "text", "Size" => "30", "Default" => "", "Required" => false,);
$additionaldomainfields[".co.uk"][] = array("Name" => "Registrant Name", "LangVar" => "uktldregname", "Type" => "text", "Size" => "30", "Default" => "", "Required" => true,);
$additionaldomainfields[".net.uk"] = $additionaldomainfields[".co.uk"];
$additionaldomainfields[".org.uk"] = $additionaldomainfields[".co.uk"];
$additionaldomainfields[".me.uk"] = $additionaldomainfields[".co.uk"];
$additionaldomainfields[".plc.uk"] = $additionaldomainfields[".co.uk"];
$additionaldomainfields[".ltd.uk"] = $additionaldomainfields[".co.uk"];
$additionaldomainfields[".co.uk"][] = array("Name" => "WHOIS Opt-out", "LangVar" => "uktldwhoisoptout", "Type" => "tickbox",);

editing the above, you could make the company number a required field - but then it would be required for an individual registration too! :roll:

 

... it also appears that this can only be used to add/edit fields, and no additional text lines can be added... to add additional text, I guess you'll be looking at {if} statements (probably in configuredomains.tpl).

 

also, the way the above code is ordered, it means only co.uk get the option of whois opt-out - but surely that should apply to org.uk and me.uk domains too ?

 

Also, I notice on this page that for each domain, whether it is a transfer or a registration, it simply lists the domain and then the number of years- i.e mydomain.com 1 Year/s. I'd like to change this to say Domain Registration mydomain.com 1 Year/s or Domain Transfer mydomain.com 1 Year/s. Can anyone possibly help me with the correct syntax to use in an IF statement to differentiate between a transfer and a registration in order to display that text?

i'd be interested in that too.

 

what you can do is throw {debug} into any of the templates and it will open a popup window displaying a list of variables available... so for example, in viewcart.tpl, there is a variable called $domains that has in its array...

 

"type => "register"

but in configuredomains.tpl, that entry doesn't exist - so I think when you get to viewcart.tpl, you can easily work out which it is by an {if} statement, but in configuredomains.tpl, it's more difficult.

Edited by brian!
Link to comment
Share on other sites

Thanks for your help Brian. It doesn't look like this has been very well thought out by WHMCS at all :( It seems to have been thrown together in a rush one day and then never re-visited. Changing this stuff is too complicated for me. I'm ok with HTML and basic smarty stuff, but this looks like too much work. It's a real shame WHMCS haven't put any effort into this. I keep stumbling upon all these really disappointing elements to this product and at times I wonder why I'm switching to WHMCS at all. :-(

Link to comment
Share on other sites

$additionaldomainfields[".co.uk"][] = array("Name" => "WHOIS Opt-out", "LangVar" => "uktldwhoisoptout", "Type" => "tickbox",);

... it also appears that this can only be used to add/edit fields, and no additional text lines can be added... to add additional text, I guess you'll be looking at {if} statements.

 

also, the way the above code is ordered, it means only co.uk get the option of whois opt-out - but surely that should apply to org.uk and me.uk domains too ?

looking at the code again, I just wanted to add that I was wrong on these two points.

 

with regards to adding text to the form, you can use the description field... and it seems you can add html tags too.

 

$additionaldomainfields[".co.uk"][] = array("Name" => "WHOIS Opt-out", "LangVar" => "uktldwhoisoptout", "Type" => "tickbox", "Description" => "<font color='red'>NB: Only applies to non-trading individuals - Companies <u>cannot</u> opt-out.</font>",);

and as for whois opt-out for me.uk and org.uk, then you just copy the above code, replace co.uk with me.uk and org.uk, and paste it back in.

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