Jump to content

Removing Product Group from client homepage


aquiss

Recommended Posts

I've been scanning the template code this weekend, but I can't find how to remove the Products/Services product group, as shown in the screenshot below. Anyone point me towards the right section please?

ideally, you should be using action hooks to do this - https://docs.whmcs.com/Working_With_Client_Area_Home_Page_Panels

 

however, as we don't have access to the code that generates the panels, they can't be "edited" in that sense... you'd need to modify the array in some way... and how usually depends on what you want to do, e.g is it easier to modify the existing array, or start again and create a new array (perhaps by querying the db) with your specific output... for your situation, either method is going to need a few lines of code and i'm sure you'll find similar hooks posted elsewhere in the forums.

 

but if you want to do it via the templates, you could edit /templates/six (or custom)/clientareahome.tpl and modify...

 

{$childItem->getLabel()}

to..

{$childItem->getLabel()|replace:'Shared Hosting - ':''}

or...

{$childItem->getLabel()|replace:'Shared Hosting - ':''|replace:'ADSL/ADSL2+ Packages - ':''}

I suppose you should really wrap it in an IF statement to ensure it only affects this specific panel (as is it will currently apply to all visible panels), but that's simple enough to do if it becomes an issue...

{if $item->getName() eq "Active Products/Services"}{$childItem->getLabel()|replace:'Shared Hosting - ':''|replace:'ADSL/ADSL2+ Packages - ':''}{else}{$childItem->getLabel(){/if}

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