Jump to content

Edit or Hide "Authorization Code " field on transfer domain


Recommended Posts

Hello

I am referring to this process on WHMCS user facing for domain transfers (incoming).

There is an Authorization Code field that sometimes confuses my clients. The reason being is the domain tld for my region does not need an Auth/EPP code.

image.thumb.png.491a16ee6bb50ca9124c0bb55578458d.png

My questions are:

1. Can I edit the "Help" text that is shown together in that field (on the right in the title area)? If so, please tell me where it is
2. Would it be possible for when a user lands on that page, that the Authorization Code field is hidden by default, and if the tld matches a domain that requires an Authorization Code, then it appears?

Thank you

Link to comment
Share on other sites

1 hour ago, spartanza said:

1. Can I edit the "Help" text that is shown together in that field (on the right in the title area)? If so, please tell me where it is

it's a language string, so you can modify it using Language Overrides.

$_LANG['orderForm']['authCodeTooltip'] = "To initiate a transfer you will need to obtain the authorization code from your current registrar. These can often be referred to as either the epp code or auth code. They act as a password and are unique to the domain name.";
1 hour ago, spartanza said:

2. Would it be possible for when a user lands on that page, that the Authorization Code field is hidden by default, and if the tld matches a domain that requires an Authorization Code, then it appears?

possible - but it's going to require a hook to get a list of TLDs that require EPP, and then js/jQuery to determine the TLD from the domain entered, check if it that TLD is in the active EPP list and, if so, react accordingly by hiding/showing the EPP form field.

I can give you a starting point of getting the list of EPP TLDs from the database...

<?php

use Illuminate\Database\Capsule\Manager as Capsule;

function hook_epp_tld_list($vars){

	if ($vars['templatefile'] == 'domaintransfer') {
		$eppcode = Capsule::table('tbldomainpricing')->where('eppcode', 1)->pluck('extension');
		return array("epptlds" => $eppcode);
	}
}
add_hook("ClientAreaPageCart", 1, "hook_epp_tld_list");

if you wanted to output that list, you could just implode the array in the template (you could do it in the hook too, but you'd still need to edit the template to output it wherever you want to).

3lRHGfs.png

another option might be to use a Language Override to change the placeholder string (or one of the others) to state that a code isn't required for South Africa (or whichever local TLD you're thinking of)

$_LANG['orderForm']['authCodePlaceholder'] = "Epp Code / Auth Code";

EpXJPCH.png

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.

×
×
  • 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