Ron the Web Guy Posted May 26, 2020 Share Posted May 26, 2020 What is the purpose of the Contacts section in the WHMCS client area? How do I edit the Shortcuts section in the WHMCS client area? How do I edit the "Register a New Domain" section so as to remove the grey Transfer button and then add a Transfer a Current Domain option below it? Mockup below... 1 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 27, 2020 Share Posted May 27, 2020 14 hours ago, Ron the Web Guy said: What is the purpose of the Contacts section in the WHMCS client area? https://docs.whmcs.com/Clients:Contacts_Tab https://docs.whmcs.com/Sub-Accounts Client users may have more than one set of contact information on their account. WHMCS uses this contact information when sending messages from specific systems. For instance, a client contact can be configured as a domain contact, and WHMCS will send all domain related email to the contact instead of the client. The contact object models this extra client contact information. Client contacts may optionally be configured as sub-accounts. Sub-accounts can log into the WHMCS client area and interact with the client's record and services, given the proper permissions set by the client. 14 hours ago, Ron the Web Guy said: How do I edit the Shortcuts section in the WHMCS client area? depends what you want to edit... if you just want to tweak a label on a default sidebar, then you can use Language Overrides. if it's more wholesale changes than that (e.g add/remove children, change icons etc), then you'll need to use action hooks.. https://docs.whmcs.com/Editing_Client_Area_Menus https://docs.whmcs.com/Client_Area_Sidebars_Cheatsheet though an existing hook, or a similar one modifiable to your needs, will probably have already been posted here previously. 14 hours ago, Ron the Web Guy said: How do I edit the "Register a New Domain" section so as to remove the grey Transfer button and then add a Transfer a Current Domain option below it? you can't easily - you could edit the content of the existing panel (with an action hook), but it really wouldn't be worth spending the time doing it - it would be quicker to just remove it and create two new panels from scratch (the content code for each would be virtually identical apart from the button and title). https://docs.whmcs.com/Working_With_Client_Area_Home_Page_Panels any particular reason why you want to split them up into two separate panels? 2 Quote Link to comment Share on other sites More sharing options...
Ron the Web Guy Posted May 28, 2020 Author Share Posted May 28, 2020 15 hours ago, brian! said: any particular reason why you want to split them up into two separate panels? IMO: It's not intuitive/customer friendly as-is since it relates to transferring a current domain as well as registering a new domain. It clearly says Register a New Domain but leaves out transferring a current domain. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 28, 2020 Share Posted May 28, 2020 1 hour ago, Ron the Web Guy said: IMO: It's not intuitive/customer friendly as-is since it relates to transferring a current domain as well as registering a new domain. it's just echoing the design of form that's on the homepage of the Six template - that too uses one form for both registering/transfer searches. 1 hour ago, Ron the Web Guy said: It clearly says Register a New Domain but leaves out transferring a current domain. then change the label... 🙂 sadly, you can't really do that with a language override as WHMCS is using that string in multiple locations and whilst changing it would make sense in this panel, it wouldn't elsewhere... so then it's just a quick hook to change it's title. <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaHomepagePanels', 1, function(MenuItem $homePagePanels) { if(!is_null($homePagePanels->getChild('Register a New Domain'))){ $homePagePanels->getChild('Register a New Domain') ->setLabel('Register or Transfer A Domain'); } }); now, if your site was multilingual, then you would create a new language string for each language and reference that new language string in the hook - but as your site is seemingly English only, the above should suffice. to a degree, I can see what you're saying about the possibility for confusion - but then I don''t think having two similar forms taking up space on the client area makes much sense either. don't get me wrong, separating the functionality into two panels could be done and it wouldn't be difficult - i'm just thinking in terms of the use of client area space and reducing the amount of elements for the user to deal with. 2 Quote Link to comment Share on other sites More sharing options...
Ron the Web Guy Posted May 28, 2020 Author Share Posted May 28, 2020 2 hours ago, brian! said: it's just echoing the design of form that's on the homepage of the Six template - that too uses one form for both registering/transfer searches. then change the label... 🙂 sadly, you can't really do that with a language override as WHMCS is using that string in multiple locations and whilst changing it would make sense in this panel, it wouldn't elsewhere... so then it's just a quick hook to change it's title. <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaHomepagePanels', 1, function(MenuItem $homePagePanels) { if(!is_null($homePagePanels->getChild('Register a New Domain'))){ $homePagePanels->getChild('Register a New Domain') ->setLabel('Register or Transfer A Domain'); } }); now, if your site was multilingual, then you would create a new language string for each language and reference that new language string in the hook - but as your site is seemingly English only, the above should suffice. to a degree, I can see what you're saying about the possibility for confusion - but then I don''t think having two similar forms taking up space on the client area makes much sense either. don't get me wrong, separating the functionality into two panels could be done and it wouldn't be difficult - i'm just thinking in terms of the use of client area space and reducing the amount of elements for the user to deal with. On 5/27/2020 at 8:02 AM, brian! said: any particular reason why you want to split them up into two separate panels? That would work fine. 🙂 Which file do I make the code changes in? language overrides? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 28, 2020 Share Posted May 28, 2020 3 minutes ago, Ron the Web Guy said: Which file do I make the code changes in? language overrides? no - the above is an action hook, so create a .php file in /includes/hooks, give it a memorable filename so that you know what it does and then copy & paste the code into it - save, refresh the page and the panel should be renamed. 1 Quote Link to comment Share on other sites More sharing options...
Ron the Web Guy Posted May 28, 2020 Author Share Posted May 28, 2020 Worked perfectly: THANK YOU! 🙂 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.