joomjump Posted December 9, 2015 Share Posted December 9, 2015 Hello Does anyone know how to edit the Actions menu under product details page, in the six template where it says login into Cpanel please? I've looked everywhere and can not seem to find it, The way I have setup the packages is where the user will only need access to a site builder. I would be grateful for any help Thanks Mark Link to comment Share on other sites More sharing options...
brian! Posted December 9, 2015 Share Posted December 9, 2015 Mark, these sidebars are controlled by action hooks - http://docs.whmcs.com/Client_Area_Sidebars_Cheatsheet if you wanted to remove it entirely, you'll need to add a file to includes/hooks, call it "actionsidebar.php" (or anything u like!), and add the following code to it... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Service Details Actions'))) { $primarySidebar->removeChild('Service Details Actions'); } }); if you just want to edit parts of it, then the cheatsheet should help - but there have been numerous example hooks posted in the forum that are more likely to work! 1 Link to comment Share on other sites More sharing options...
joomjump Posted December 9, 2015 Author Share Posted December 9, 2015 Hello Thank you for your help. Where would I find the link and name (Login to Cpanel) on the actions menu, it's the only part I really want to remove is that link? Could you tell where to go, the file and path? Thanks again Link to comment Share on other sites More sharing options...
brian! Posted December 9, 2015 Share Posted December 9, 2015 there isn't a file to edit - you need to use an action hook.... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Service Details Actions')) { $primarySidebar->getChild('Service Details Actions') ->removeChild('Login to cPanel'); } }); 1 Link to comment Share on other sites More sharing options...
joomjump Posted December 9, 2015 Author Share Posted December 9, 2015 there isn't a file to edit - you need to use an action hook.... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Service Details Actions')) { $primarySidebar->getChild('Service Details Actions') ->removeChild('Login to cPanel'); } }); When I add this to includes/hooks and named the php file action.php and pasted the code into the file and the entire WHMCS system has a 500 internal server error, so I have removed it again and everything works. So I'm still not any closer to removing this one link thank you mark Link to comment Share on other sites More sharing options...
brian! Posted December 9, 2015 Share Posted December 9, 2015 Mark, it works fine on my v6 dev - no issues at all... but it looks like I missed a bracket out when pasting... try the code below <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Service Details Actions'))) { $primarySidebar->getChild('Service Details Actions') ->removeChild('Login to cPanel'); } }); 1 Link to comment Share on other sites More sharing options...
joomjump Posted December 9, 2015 Author Share Posted December 9, 2015 Perfect, my fault, it works now. Thank you very much for your help! Link to comment Share on other sites More sharing options...
sha Posted January 25, 2018 Share Posted January 25, 2018 I have the same issue. Can I change the cpanel login url instead of removing it? My hosting account doesn't have root access privilege. So I want to change the cPanel login link url to "customerdomain/cpanel" can I do that? Link to comment Share on other sites More sharing options...
brian! Posted January 26, 2018 Share Posted January 26, 2018 19 hours ago, sha said: I have the same issue. Can I change the cpanel login url instead of removing it? My hosting account doesn't have root access privilege. So I want to change the cPanel login link url to "customerdomain/cpanel" can I do that? Link to comment Share on other sites More sharing options...
Recommended Posts