Jump to content

Where do I find "View Ticket Customer URL" in WHMCS Admin?


USA_Webmaster

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!!

Link to comment
Share on other sites

  • 7 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated