yggdrasil Posted August 10, 2020 Share Posted August 10, 2020 (edited) 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 August 10, 2020 by yggdrasil 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 11, 2020 Share Posted August 11, 2020 12 hours ago, yggdrasil said: I don't mean the data its pulling, but the HTML code that renders/generates the page. do you mean clientareadomaincontactinfo.tpl ? 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 16, 2020 Author Share Posted August 16, 2020 On 8/11/2020 at 7:28 AM, brian! said: do you mean clientareadomaincontactinfo.tpl ? Yes, that page. Seems it pulls data from the API and renders things on the fly which makes it next to impossible to edit or customize. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 17, 2020 Share Posted August 17, 2020 21 hours ago, yggdrasil said: Seems it pulls data from the API and renders things on the fly which makes it next to impossible to edit or customize. what are you trying to do ? 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 17, 2020 Author Share Posted August 17, 2020 1 hour ago, brian! said: what are you trying to do ? Translate the text. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 17, 2020 Share Posted August 17, 2020 11 minutes ago, yggdrasil said: Translate the text. do you mean the form field headings, e.g Full Name, Email etc ? 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 17, 2020 Author Share Posted August 17, 2020 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. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 17, 2020 Share Posted August 17, 2020 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))... 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 18, 2020 Author Share Posted August 18, 2020 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))... I suspected that was the only way, having to override everything before being rendered to the template file. 😪 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 18, 2020 Share Posted August 18, 2020 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. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 19, 2020 Author Share Posted August 19, 2020 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. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 19, 2020 Share Posted August 19, 2020 4 hours ago, yggdrasil said: You mean the translations variables exist but for some reason WHMCS is not applying them properly to the page? the above is from when the language is set to French - the correct translations are available in the language file... ... 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. 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.