Jump to content

Contact Information Domain Customization


yggdrasil

Recommended Posts

Does someone know where the template code is to customize the domain details contact information for a domain?
 

It seems WHMCS pulls this data from with the API from the registrar with an array but there should be a way to still visually customize the fields and HTML page or there is none?

I don't mean the data its pulling, but the HTML code that renders/generates the page.

Edited by yggdrasil
Link to comment
Share on other sites

3 minutes ago, brian! said:

do you mean the form field headings, e.g Full Name, Email etc ?

Yes, plus I like to change the fields with some CSS to make them a bit more appealing. As opposed to the same fields in customer and sub accounts profiles contact information, those fields do not seem to use the language files.

Link to comment
Share on other sites

11 minutes ago, yggdrasil said:

Yes, plus I like to change the fields with some CSS to make them a bit more appealing. As opposed to the same fields in customer and sub accounts profiles contact information, those fields do not seem to use the language files.

possibly they're getting pulled from the registrar - as different registrars might used differently names fields.

in terms of the template, you could change...

<label>{$name}</label>

to...

<label>{$LANG.domaincontactdetails.{$name}}</label>

and that would use the language overrides equivalent of the array key (you'll need to add your string changes to the overrides file(s))...

EOqGgKe.png

Link to comment
Share on other sites

11 hours ago, brian! said:

possibly they're getting pulled from the registrar - as different registrars might used differently names fields.

in terms of the template, you could change...


<label>{$name}</label>

to...


<label>{$LANG.domaincontactdetails.{$name}}</label>

and that would use the language overrides equivalent of the array key (you'll need to add your string changes to the overrides file(s))...

EOqGgKe.png

I suspected that was the only way, having to override everything before being rendered to the template file. 😪

Link to comment
Share on other sites

12 hours ago, yggdrasil said:

I suspected that was the only way

I don't think it's the only way - just the simplest one that occurred to me after quickly ruling out some other options...

i'll tell you the fly in the ointment with this is that there is already a translations array available to that template, but it's not being updated on language change, or seemingly using language overrides at all... so I don't know if it's bugged, or just not working as I would expect it to... but it looks like WHMCS is designed to be able to translate them, but for whatever reason, it just isn't doing it.

hooking might be an option, but if you were editing the template, then the above was the quickest way I could think of yesterday.

Link to comment
Share on other sites

13 hours ago, brian! said:

I don't think it's the only way - just the simplest one that occurred to me after quickly ruling out some other options...

i'll tell you the fly in the ointment with this is that there is already a translations array available to that template, but it's not being updated on language change, or seemingly using language overrides at all... so I don't know if it's bugged, or just not working as I would expect it to... but it looks like WHMCS is designed to be able to translate them, but for whatever reason, it just isn't doing it.

hooking might be an option, but if you were editing the template, then the above was the quickest way I could think of yesterday.

The fields do look similar ones I translated before in the locale files. You mean the translations variables exist but for some reason WHMCS is not applying them properly to the page? That would definitely be a bug since what is the point of having them if they are not doing anything.

Link to comment
Share on other sites

4 hours ago, yggdrasil said:

You mean the translations variables exist but for some reason WHMCS is not applying them properly to the page?

T9YBJyW.png

the above is from when the language is set to French - the correct translations are available in the language file...

dyoefKc.png

... hence why the quick fix is to reference the language file in the template... you could probably hook to reset the keys in the array, but that's a lot more involved that just one line of Smarty.

4 hours ago, yggdrasil said:

That would definitely be a bug since what is the point of having them if they are not doing anything.

I don't see the point of a translations array if it doesn't contain the correct translations... whether it's a bug or it's there for other purposes, I can't say.

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