vam87t Posted December 9, 2015 Share Posted December 9, 2015 Hello, from WHMCS6 I use the six template, this template is different from five and old template, and I have serius issue for customize it. Into my client area homepage, I see the "panel tab" > Domains Expiring Soon, the problem is that we not permit to the customer to renew the domain manually, so when you click "Renew Now" the WHMCS refresh the page and not do any action. This is an problem, because many customer think that there is an error into ClientArea. There is anyone that know how can I change the link of "Domains Expiring Soon" from actual: cart.php?gid=renewals to for example: clientarea.php?action=domains? Same thing for "alter notification bar", I have the same problem. I try to read the documentation of WHMCS; but I understend only how can I add an new PanelTab or remove the actual. Thanks for the help Regards 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 9, 2015 Share Posted December 9, 2015 There is anyone that know how can I change the link of "Domains Expiring Soon" from actual: cart.php?gid=renewals to for example: clientarea.php?action=domains? create a file called "domainexpirypanel.php" (or anything you like!), add it to includes/hooks and add the following code to it... <?php use WHMCS\View\Menu\Item; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { $homePagePanels->getChild('Domains Expiring Soon') ->setExtra('btn-link','clientarea.php?action=domains'); }); this will change the link on the panel to the one you wish. Same thing for "alter notification bar", I have the same problem. that's a good question - I don't know if notifications (alerts) can be modified or deleted... though they can be easily added... as with other aspects of these new features, the documentation isn't great (or anywhere near complete). other options to look at might be to remove the notifications section from the header.tpl; modify the order-form template/domainrenewals.tpl template to remove the option to renew the domains, or perhaps use htaccess to redirect visitors from cart.php?gid=renewals -> clientarea.php?action=domains 0 Quote Link to comment Share on other sites More sharing options...
vam87t Posted December 9, 2015 Author Share Posted December 9, 2015 Hello the hooks works fine thanks. About the "alert" even if I do the 301, the redirect not works, because when you click the option into "alert" the result is Always rdirect into clientarea.php page. The redirect code is that RewriteRule cart.php?gid=renewals http://domain.tld/page [L,NC,R=301] If I do into browser http://domain.tld/page the redirect works fine, but from WHMCS no. Any idea? Thanks Regards 0 Quote Link to comment Share on other sites More sharing options...
vam87t Posted December 9, 2015 Author Share Posted December 9, 2015 Hello the hooks works fine, but the 301 redirect no, even if the redirect is correct Redirect 301 /clients/cart.php?gid=renewals https://www.domain.tld/link Do you have any idea? Thanks 0 Quote Link to comment Share on other sites More sharing options...
vam87t Posted December 9, 2015 Author Share Posted December 9, 2015 Hello, anyway I wrote wrong, I mean the "notifications" bar, there is an way for change the link also into notification bar? Regards 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 9, 2015 Share Posted December 9, 2015 do you mean the notifications bar shown in the image below ? you want to change the "Renew Now" link ?? i'm not aware of any way to change that link - support might be able to help (if so, let the rest of us know their answer!) or perhaps someone else on the forum knows. 0 Quote Link to comment Share on other sites More sharing options...
vam87t Posted December 9, 2015 Author Share Posted December 9, 2015 do you mean the notifications bar shown in the image below ? you want to change the "Renew Now" link ?? i'm not aware of any way to change that link - support might be able to help (if so, let the rest of us know their answer!) or perhaps someone else on the forum knows. Yes I mean that. I opened an support request to WHMCS. About your hooks unfortunatly not works well, I receive from client area this error Fatal error: Call to a member function setExtra() on a non-object in /var/www/vhosts/root/httpdocs/clients/includes/hooks/panel_boxdomainexpires.php on line 7 Solution? Regards 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.