Jump to content

Affiliate area


suportgc

Recommended Posts

Good afternoon friends.

 

I wonder how I can hide some parts of the affiliate area.

 

The first is the affiliates menu, I would like to only show it to affiliate clients as I do not intend to expose this tab.

 

I just want anyone who is already affiliated to have access to the tab and menu.

 

Another item that you would like to hide is the link for nomination.

 

They will not be indicated via link, and in order not to confuse the affiliates, I intend to remove this information.

 

Follow prints for better understanding.

 

Can you help me?

 

Af1.thumb.png.a55dc73425f68c326d7c8dd5de098226.png

Af2.thumb.png.bcec276f122f598edd99b160bdd2df8b.png

Link to comment
Share on other sites

Good afternoon friends.

I wonder how I can hide some parts of the affiliate area.

The first is the affiliates menu, I would like to only show it to affiliate clients as I do not intend to expose this tab.

I just want anyone who is already affiliated to have access to the tab and menu.

use the hook in the thread below to remove the affiliates navbar link for those who are not logged in.

 

https://forum.whmcs.com/showthread.php?115015-change-the-menu-of-logged-out-users&p=465402#post465402

 

Another item that you would like to hide is the link for nomination.

They will not be indicated via link, and in order not to confuse the affiliates, I intend to remove this information.

Follow prints for better understanding.

Can you help me?

i'm not quite sure what it is you want to do, but the image is from affiliates.tpl and so that is a file that you can edit... if you just want to change the text, you can use Language Overrides.

Link to comment
Share on other sites

use the hook in the thread below to remove the affiliates navbar link for those who are not logged in.

 

https://forum.whmcs.com/showthread.php?115015-change-the-menu-of-logged-out-users&p=465402#post465402

 

 

i'm not quite sure what it is you want to do, but the image is from affiliates.tpl and so that is a file that you can edit... if you just want to change the text, you can use Language Overrides.

 

 

Hello, Brian.

 

Thank you for the tips.

 

I would like to just hide so that you are not affiliated.

 

I want to display this menu only for affiliates.

Is it possible ?

Link to comment
Share on other sites

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
{
   $client = Menu::context('client');
   $affid = $client->affiliate->id;

   if (is_null($affid) and !is_null($primaryNavbar->getChild('Affiliates'))) {
           $primaryNavbar->removeChild('Affiliates');
   }
}); 

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