FatihYldrm Posted January 24, 2017 Share Posted January 24, 2017 Affiliate Commission Balance clientarea.php I want to show. I'm happy if you help me. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2017 Share Posted January 24, 2017 same answer as the other thread - you're going to need to use an Action Hook. 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 I do not know if I'm successful with hook. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2017 Share Posted January 24, 2017 you likely haven't written one yet! just adding {php} to the template will not work - even if it did work, you shouldn't use it! 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 If there is one example, I will continue but I could not find it. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2017 Share Posted January 24, 2017 If there is one example, I will continue but I could not find it. there are plenty of example hooks in the forums - i've just wrote one for you in the thread below... https://forum.whmcs.com/showthread.php?124446-Member-Created-Date&p=499502#post499502 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 First of all thank you I try to understand the meaning of hook. I tried to do the following code myself to print Affiliate Commission but it does not show on the screen. <?php use Illuminate\Database\Capsule\Manager as Capsule; function hook_balance($vars){ $client = Menu::context('client'); return array("balance" => $client->balance); } add_hook("ClientAreaPage", 1, "hook_balance"); 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2017 Share Posted January 24, 2017 you'll need to refer to the documentation - http://docs.whmcs.com/classes/7.0/WHMCS/User/Client/Affiliate.html - but you could try.... return array("balance" => $client->affiliate->balance); 0 Quote Link to comment Share on other sites More sharing options...
FatihYldrm Posted January 24, 2017 Author Share Posted January 24, 2017 Now I understand better thank you. 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.