Jump to content

Removing sections from service overview


RyanD

Recommended Posts

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

Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated