RyanD Posted June 30, 2020 Share Posted June 30, 2020 Hi everyone, I've created a provisioning module and I'm overriding the service details template by setting tabOverviewReplacementTemplate via the <module>_ClientArea function. Whilst this has removed the standard WHMCS service overview (product name, billing information etc), the Downloads, Addons and Change Password sections are still displayed beneath the output from my template: https://ibb.co/j8Cw28x There's plenty of guidance on how to change WHMCS' various menus but I don't seem to be able to remove these elements from the page. Would anyone be able to point me in the right direction? Thank you for your help 0 Quote Link to comment Share on other sites More sharing options...
cdeese8 Posted July 1, 2020 Share Posted July 1, 2020 A quick and dirty hack is to use CSS - https://www.w3schools.com/css/css_display_visibility.asp Another thought is to use a hook to remove data on specific page * https://developers.whmcs.com/hooks/ * https://duckduckgo.com/?q=site%3Awhmcs.community+hook+remove+data 0 Quote Link to comment Share on other sites More sharing options...
RyanD Posted July 2, 2020 Author Share Posted July 2, 2020 Thank you for your help. I've explored using a hook but I'm not actually sure how to reference those sections in the hook, it doesn't seem to be documented (unless I've completely missed it). There's plenty of guidance on manipulating menus but actually removing sections from the main body doesn't seem to be as discussed. For example, the ClientAreaProductDetails hook seems to be the correct hook, but I really don't know how to approach stripping the elements from the page using this hook. Hiding the sections using CSS would be an option as they're non-functional anyway, but this would involve changing the "Other" service details template and I only want these sections to be hidden when a service is using my custom provisioning module. Unless I can specify a module-specific override for these as well? 0 Quote Link to comment Share on other sites More sharing options...
RyanD Posted July 2, 2020 Author Share Posted July 2, 2020 I went down the dirty CSS method into modules/servers/<name>/template.tpl <style> #tabDownloads, #tabAddons, #tabChangepw { display: none; } </style> I tried writing a hook for ClientAreaProductDetails and ClientAreaProductDetailsPreModuleTemplate that returned an empty value for $downloads but this didn't seem to have an affect e.g. return array("downloads'" => ""); Does anyone know if this should have worked? Looking at the template for templates/default/clientareaproductdetails.tpl there is a conditional display based on whether $downloads is empty or not, so I would have expected the above hook to work. 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.