netx Posted October 17, 2016 Share Posted October 17, 2016 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... 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. you could edit the clientareadomaingetepp.tpl template and change its content. 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! 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! 0 Quote Link to comment Share on other sites More sharing options...
netx Posted October 31, 2016 Author Share Posted October 31, 2016 Hi @brian! , any update? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 31, 2016 Share Posted October 31, 2016 apologies - didn't see the thread until tonight. my first thought, if you wanted to avoid writing a hook, would just be to edit 'clientareadomaingetepp.tpl' and make the changes in there... if I get the chance, i'll have a look at that tomorrow. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 1, 2016 Share Posted November 1, 2016 as I thought, it is possible to do this without a hook and by editing the template. 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... 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. 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.