Jump to content
jfreak53

TicketAdminReply hook, does it return anything

Recommended Posts

You need to make any changes directly in the database.

 

e.g.

update_query("tblticketreplies",array("admin" => $admin['firstname'] . " ". $admin['lastname']), array("id" => $params['replyid']));

Share this post


Link to post
Share on other sites

Thanks, that works but the problem I'm having now is that the email is sent before the hook is activated, so my DB changes don't take affect but on the site. Back to the drawing board then :( thanks.

 

- - - Updated - - -

 

It also seems that it keeps updating the 'admin' column after my hook runs as no matter what I place there in that column it still keeps the posting user.

 

- - - Updated - - -

 

Scratch the second, I found the problem with the second not updating. But it's still sending email before the hook.

Share this post


Link to post
Share on other sites

If you aren't seeing the changes in the email then you would need to create an EmailPreSend hook and pass back a new variable containing the admin you would like to change the reply to and then update the email template to use this new variable.

Share this post


Link to post
Share on other sites

Not working either, unfortunately that runs on the templates for emails and not on the ticket text sent. So it won't grab the variables in the ticket text during reply. I tried this and it won't replace it before sending the email:

 

function PresendEmailTicket ( $vars ) {

$merge_fields = array();

$merge_fields['test'] = 'tester2';

 

return $merge_fields;

}

 

add_hook("EmailPreSend", 2, "PresendEmailTicket");

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines