Jump to content

Get EPP Code confirmation prompt hook ?


netx

Recommended Posts

Original Thread: https://forum.whmcs.com/showthread.php?90982-disable-client-get-epp-code

 

I think there would be at least four ways to do this...

 

  1. go to Domain Pricing - http://docs.whmcs.com/Domain_Pricing - and untick the EPP Code checkbox for each TLD, that should prevent the link appearing for those TLDs.
  2. you could edit the clientareadomaingetepp.tpl template and change its content.
  3. you could modify the sidebar link to another URL, e.g the appropriate support department... though I won't post the code as it currently doesn't work 100% of the time - I know why, just trying to figure a way around it! :roll:
  4. you could remove the Get EPP link from the sidebar...

<?php


use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar)
{

   if (!is_null($primarySidebar->getChild('Domain Details Management'))) {
            $primarySidebar->getChild('Domain Details Management')
                           ->removeChild('Get EPP Code');
   }

});

 

Hi Brian,

 

Thanks for posting this hook php script how to remove EPP code option from the Sidebar.

 

I wonder if instead of removing this EPP code option, could a hook php script actually handle that whenever a user clicks on Sidebar's "Get EPP Code" he/she would get prompted first to confirm "Yes" or "No" before the actual EPP code is released? (eNom Registrar) This could be either a pop-up window confirmation prompt or a right-side page confirmation with a question something like "EPP Code will be released and sent to your email. Are you sure?" and then to buttons "Yes" and "No" displayed - similarly how a right side "Auto Renew" page is displayed now. Once clicked:

1)Yes => Proceed with a standard "Get EPP Code" operation

2)NO => otherwise Cancel "Get EPP Code" operation.

 

Currently, EPP code is bluntly released just by user's browsing and clicking on Domain Details Management's Sidebar menu options without any user's confirmation which is not a industry standard (single-click EPP code release) that creates unnecessary EPP code releases.

 

Fyi - I had requested this EPP code enhancements future along with other related ones @ https://requests.whmcs.com/topic/enhance-epp-code-release-delivery-configuration-enom-module but so far I had no WHMCS teams response nor any no enhancements were done for this EPP code related requests in new 7.X version yet.

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

as I thought, it is possible to do this without a hook and by editing the template. :idea:

 

so in clientareadomaingetepp.tpl, I would replace the existing code with...

 

<h3>{$LANG.domaingeteppcode}</h3>

<p>
   {$LANG.domaingeteppcodeexplanation}
</p>
EPP Code will be released and sent to your email. Are you sure?
<br />
<br />

   <p class="text-center">
   <a href="{$currentpagelinkback}getcode=1" class="btn btn-lg btn-success"><span class="glyphicon glyphicon-envelope"></span> {$LANG.yes}</a> 
   <a href="{$smarty.server.PHP_SELF}?action=domaindetails&id={$domainid}#tabOverview" class="btn btn-lg btn-danger"><span class="glyphicon glyphicon-remove"></span> {$LANG.no}</a>
   </p>

   {if $smarty.get.getcode eq '1'}

{if $error}
   {include file="$template/includes/alert.tpl" type="error" msg=$LANG.domaingeteppcodefailure|cat:" $error"}
{elseif $eppcode}
   {include file="$template/includes/alert.tpl" type="warning" msg=$LANG.domaingeteppcodeis|cat:" $eppcode"}
{else}
   {include file="$template/includes/alert.tpl" type="warning" msg=$LANG.domaingeteppcodeemailconfirmation}
{/if}

   {/if}

and the client will see the following...

OLYXxS7.png

if they press "Yes", then the EPP Code is emailed to the client (or shown on-screen*); if they press "No", then they're taken back to the domain overview page.

 

* it's worth noting that what WHMCS does when the user clicks "Yes" is entirely down to the registrar module - e.g in the registrar modules we use, they all show the EPP Code on screen; from what you say, I assume the eNom module emails it to the registrant (but we don't use eNom so can't verify this).

 

if you're going to use this solution, i'd be tempted to remove "EPP Code will be released and sent to your email. Are you sure?" text from the template and use a Language Override - perhaps by appending the {$LANG.domaingeteppcodeexplanation} entry.

 

with regards to the feature request, you couldn't have an option of "EPP code for ALL TLDs" because not all TLDs support EPP Code - most ccTLDs don't require their use.

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