ManagedCloud-Hosting Posted May 13, 2020 Share Posted May 13, 2020 Hi, Can we insert a custom URL below the Contacts/Sub-Accounts, I want to insert the Affiliate / Other page link (https://domainname.com/affiliates.php) here opening in the same or new window? Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 14, 2020 Share Posted May 14, 2020 17 hours ago, VirtualWorldGlobal said: Can we insert a custom URL below the Contacts/Sub-Accounts, I want to insert the Affiliate / Other page link (https://domainname.com/affiliates.php) here opening in the same or new window? that's just a secondary navbar hook - and i'm assuming that you want to check that they're affiliates before adding the link... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondaryNavbar', 1, function (MenuItem $secondaryNavbar) { $client = Menu::context('client'); $affiliate = $client->affiliate; if ($affiliate && !is_null($secondaryNavbar->getChild('Account'))) { $secondaryNavbar->getChild('Account')->addChild('affiliates', array('label' => Lang::trans('affiliatestitle'),'uri' => 'affiliates.php','order' => 25,))->setAttribute('target','_blank'); } }); 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted May 14, 2020 Author Share Posted May 14, 2020 Thanks @brian! I think I am wrong somewhere as it is not working as expected. Unable to locate Affiliates here. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 14, 2020 Share Posted May 14, 2020 24 minutes ago, VirtualWorldGlobal said: I think I am wrong somewhere as it is not working as expected. Unable to locate Affiliates here. is the user you are logged in as an affiliate ? if not, it won't appear. if you want it to appear for everyone, then just remove the affiliate part of the if statement. if (!is_null($secondaryNavbar->getChild('Account'))) { 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted May 14, 2020 Author Share Posted May 14, 2020 (edited) Working now👏 is there any way of adding data Manually to the below fields Edited May 14, 2020 by VirtualWorldGlobal 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 15, 2020 Share Posted May 15, 2020 19 hours ago, VirtualWorldGlobal said: is there any way of adding data Manually to the below fields you mean manually adding an affiliate to an existing order... https://docs.whmcs.com/Affiliates#Assigning_an_Affiliate_to_an_Existing_Order 0 Quote Link to comment Share on other sites More sharing options...
ManagedCloud-Hosting Posted May 15, 2020 Author Share Posted May 15, 2020 Hi @brian! We have added affiliates and entered payments manually from Admin Area but they do not show in the customers affiliate area (under affiliates in Client Area). How to manually update details for these fields ? 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.