getstreamhosting Posted March 28, 2016 Share Posted March 28, 2016 (edited) I'm pretty sure it's possible, but Is there a way we can get the clients group name beside their name in the tickets area? Either under their name or beside it (Under it might fit better) Also to add... having it viewable by staff only Edited March 28, 2016 by getstreamhosting 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 28, 2016 Share Posted March 28, 2016 do you mean in the admin area? if so, that's going to require an action hook to query the database for the client group value and name.... 0 Quote Link to comment Share on other sites More sharing options...
getstreamhosting Posted March 28, 2016 Author Share Posted March 28, 2016 Yes, I was referring to in the admin area... When you click on a ticket, and the page you are viewing has your reply box, and you can see previous ticket replies below that... Having the clients group name listed there in their replies. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 29, 2016 Share Posted March 29, 2016 you could create an action hook and place it in the includes/hooks folder and give it a name, e.g 'adminviewticket.php' <?php use Illuminate\Database\Capsule\Manager as Capsule; function admin_ticket_clientgroup_hook($vars) { if ($vars['pagetemplate']=="viewticket") { $clientgroup = Capsule::table('tblclients') ->join('tblclientgroups', 'tblclients.groupid', '=', 'tblclientgroups.id') ->where('tblclients.id', $vars['userid']) ->get(); } return array("clientgroup" => $clientgroup[0]->groupname); } add_hook("AdminAreaPage", 1, "admin_ticket_clientgroup_hook"); ?> that will create a Smarty variable, $clientgroup, that you can use in the 'viewticket.tpl' template - you could change... <div class="title"> {if $reply.contactid} {$_ADMINLANG.fields.contact} {elseif $reply.userid} {$_ADMINLANG.fields.client} {else} <a href="mailto:{$reply.clientemail}">{$reply.clientemail}</a> {/if} </div> to... <div class="title"> {if $clientgroup}{$_ADMINLANG.fields.clientgroup}: {$clientgroup} {elseif $reply.contactid} {$_ADMINLANG.fields.contact} {elseif $reply.userid} {$_ADMINLANG.fields.client} {else} <a href="mailto:{$reply.clientemail}">{$reply.clientemail}</a> {/if} </div> that will show the client group below the client name - if they are not in a client group, it will work as previously and display 'Contact' or 'Client' (or your language equivalent). 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.