USA_Webmaster Posted May 11, 2016 Share Posted May 11, 2016 I'm on this page for example "domain.com/supporttickets.php?view=active" and I don't really see this option. How do I get the URL that the customer receives in their email? In the email, they get something like "http://domain.com/viewticket.php?tid=922262&c=1xmvUUB8" It's the automatically generated Ticket for the newly created ticket. I don't see any reference on the docs neither. http://docs.whmcs.com/Support_Tickets http://docs.whmcs.com/API:Open_Ticket 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted May 12, 2016 Share Posted May 12, 2016 In your thread title you say "WHMCS Admin" but the URL provided is in client area so where exactly do you need this URL to appear? as example it can be added to "View Ticket" -> "domain.com/admin/supporttickets.php?action=view&id=102", create new file inside "/includes/hooks/" name it "viewticketurl.php" or anything you prefer, and put the following function inside it: <?php use Illuminate\Database\Capsule\Manager as Capsule; add_hook("AdminAreaPage", 1, function($vars){ global $CONFIG; $getTicketCode = Capsule::table("tbltickets")->where("tid", $vars['tid'])->select("c")->get(); if ($vars['inticket']===true){ return array("caviewticketurl" => $CONFIG['SystemURL']."/viewticket.php?tid=".$vars['tid']."&c=".$getTicketCode[0]->c); } }); no open this file for editing /admin/templates/blend/viewticket.tpl, you can add this smarty tag where you need this URL to appear: {$caviewticketurl} you can do the same in client area if that what you need, very simple 0 Quote Link to comment Share on other sites More sharing options...
USA_Webmaster Posted May 14, 2016 Author Share Posted May 14, 2016 Darrrn, I think that is exactly what I was looking for. I desired the URL that client receives VIA email when they open ticket...but in the WHMCS admin area. With your code snippet and wisdom above, it appears as though I can modify my Admin theme just a little bit and get the exact results I'm looking for. Thanks!! 0 Quote Link to comment Share on other sites More sharing options...
Daniel Oluseyi Posted August 24, 2023 Share Posted August 24, 2023 This same issue is happening to both ticket on inbox, and even when my page enters a 404 error page, the button that's supposed to direct one to HOMEPAGE, directs to ADMIN. How can this be sorted please? 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.