wtools Posted December 18, 2018 Share Posted December 18, 2018 I tried to update ticket count using the below hook, but that's not working. add_hook('ClientAreaPrimaryNavbar', 1, function( Item $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Support'))) { $primaryNavbar ->getChild('Support') ->getChild('Tickets') ->setBadge(11); } }); I would like to set the ticket count in the client area home page to a diffrent value, how can i do that? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 19, 2018 Share Posted December 19, 2018 17 hours ago, wtools said: I tried to update ticket count using the below hook, but that's not working. it wouldn't as they aren't part of the navbar.... are we talking about the homepage tiles ? 17 hours ago, wtools said: I would like to set the ticket count in the client area home page to a different value, how can i do that? two options - simplest way, just edit the clientareahome.tpl template as that is where which of these tiles are displayed to the user... the other way might be to use a clientareapagehome action hook and modify the {$clientsstats.numactivetickets} array, but unless you were replacing it with a new value that had to be generated/queried, it's probably easier to just edit the template. 0 Quote Link to comment Share on other sites More sharing options...
wtools Posted December 19, 2018 Author Share Posted December 19, 2018 Thanks , it helped me a lot. 0 Quote Link to comment Share on other sites More sharing options...
wtools Posted December 19, 2018 Author Share Posted December 19, 2018 add_hook('ClientAreaPageHome', 1, function($vars) { $vars['clientsstats']['numactivetickets'] = 20; return $vars; }); This is the code I used, and it worked great. 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.