Jump to content

Addidng additional domain fields using additionalfields.php


Recommended Posts

Hi.

I need to add some additional fields only for registering .dj domains.

I have created and added the code to the additionalfields.php file as per the information at https://docs.whmcs.com/Additional_Domain_Fields

However when I try to add a domain the add new order page in the Admin system, as soon as I type the dotof the domain name (before I even type the extension) it just throws the code onto the screen where I would expect the additional fields, see screen shot.5aa3d8a7519ac_Uadditionalfields.thumb.png.bbb6b42b7d7466a726b6434878b8503c.png.

Although the documentation does not say anything, do I need to add these new fields into the database as well?

Thanks

Link to comment
Share on other sites

21 hours ago, Clearview said:

Although the documentation does not say anything, do I need to add these new fields into the database as well?

I think the documentation is missing one useful bit of info - namely because this is a PHP file, it therefore needs to start with <?php (the same as dist.additionalfields.php does)...

<?php

$additionaldomainfields[".dj"][] = array( "Name" => "Description of the intended use", "Type" => "text", "Size" => "250",);
$additionaldomainfields[".dj"][] = array( "Name" => "1st name server", "Type" => "text", "Size" => "100",);
$additionaldomainfields[".dj"][] = array( "Name" => "2nd name server", "Type" => "text", "Size" => "100",);

do that, and the clients will see the above fields when ordering...

21 hours ago, Clearview said:

I need to add some additional fields only for registering .dj domains.

it's probably also worth mentioning that I don't think your clients will be able to order .dj domains from your website.

although you can add the TLD to domain pricing (and I can see that you have), there isn't an entry for a whois server for the TLD in dist.whois.json (the default file), or in a custom whois.json file.... without that, searches for .dj domains will always respond with unavailable and the client order will not progress.

if memory serves, .dj don't have a port 43 whois server, and i'm not sure the webform is one that WHMCS can handle... so unless you can find a working alternative, or use a lookup provider that sells the TLD, then clients won't be able to order them online from you.

Link to comment
Share on other sites

Thanks for the quick reply. I really should have noticed the missing php opening tag

I am just looking to let my customers renew their names via WHMCS.

I have been selling .dj domains for many years so have a proven solution for the sales. I currently have a custom written php application that deals with the renewal reminders and renewals, however since updating the servers the scheduled tasks no longer run correctly and the developer is not responding to my emails.

Given that we never got all the little glitches out of the application and I already pay for WHMCS it seems to make sense to see if I can rope WHMCS into dealing with the renewal reminders and the domain renewals as well as opening up additional payment gateways for my customers (my current application only supports PayPal).

I will test out the missing bit of code tomorrow.

Thanks

Link to comment
Share on other sites

11 hours ago, Clearview said:

Given that we never got all the little glitches out of the application and I already pay for WHMCS it seems to make sense to see if I can rope WHMCS into dealing with the renewal reminders and the domain renewals as well as opening up additional payment gateways for my customers (my current application only supports PayPal).

if you're manually adding them from the admin area, then renewal handling should work fine as with any other TLD... there may be an issue with syncing the expiry date (if you use the domain sync option), but other than that, I can't see an issue for using WHMCS for this.

Link to comment
Share on other sites

Just tested this all today and I have come across a snag.

Is there any way to make the new fields appear when the customer logs into WHMCS to manage / renew their domain?

The main thing it to allow them to update the nameservers or the forwarding settings.

Can you add custom activities in the what would you like to do today area? it would be nice to have the additional options there rather than just the renew domain option.

Again, these different actions need to be just for the .dj extension, not all domain types.

5aa540eed9fe2_domainrenew.thumb.png.adc95fa9e3e261ede4c9700ba23737b0.png 

Thanks

Link to comment
Share on other sites

19 hours ago, Clearview said:

Is there any way to make the new fields appear when the customer logs into WHMCS to manage / renew their domain?

The main thing it to allow them to update the nameservers or the forwarding settings.

those features are added automatically if the registrar module, assigned to the domain, supports them.... if they don't support them, they aren't added.

19 hours ago, Clearview said:

Can you add custom activities in the what would you like to do today area? it would be nice to have the additional options there rather than just the renew domain option.

Again, these different actions need to be just for the .dj extension, not all domain types.

the problem you will have is that WHMCS doesn't store nameserver, forwarding settings etc for domains - they are pulled from, and sent back to, the registrar when required... therefore, you will probably need to update your custom script.

in an ideal world, you'd just go back to your developer and get it to tweak it accordingly - but if he's gone missing, then you may need to contact another developer to update/rewrite the script... that's even assuming that the registry supports changes to nameservers etc in that way.

the only other built-in way to do it would be to get the user to open a support ticket when they want to make such changes... and then you'd have to manually apply them (assuming you can do that, e.g via registry site etc).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • 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