Si Posted July 19, 2017 Share Posted July 19, 2017 Just as the ticket title says: When replying to a ticket as admin, it would be great if the ticket pre-populated the start of the ticket with Hello {$client_first_name}, Anyone know how to do this? 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted July 20, 2017 Share Posted July 20, 2017 Just as the ticket title says: When replying to a ticket as admin, it would be great if the ticket pre-populated the start of the ticket with Hello {$client_first_name}, Anyone know how to do this? Yes, before you reply to a ticket, manually type; Hello [FIRSTNAME], 0 Quote Link to comment Share on other sites More sharing options...
Si Posted July 20, 2017 Author Share Posted July 20, 2017 Not exactly what I had in mind. But thanks for replying. I had this working via a third party module for the past number of years but it doesn't work in PHP 7 and hasn't been updated. So I do know it's possible. 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted July 20, 2017 Share Posted July 20, 2017 I was just being sarcastic. I am sure this is possible via a hook, it seems anything is possible with WHMCS nowadays. A quick way I can think of is when you are logged in as an administrator, if you go to My Account >> Support Ticket Signature . you can enter something in there and it will be displayed in every ticket message. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 20, 2017 Share Posted July 20, 2017 I was just being sarcastic. there's nothing wrong with a bit of sarcasm on a Thursday! A quick way I can think of is when you are logged in as an administrator, if you go to My Account >> Support Ticket Signature. you can enter something in there and it will be displayed in every ticket message. not a bad suggestion, but I doubt you could make it client-specific... another option would be an edit of the admin template of viewticket.tpl (i'm working in Blend, but assume v4 would be similar) and change... <textarea name="message" id="replymessage" rows="14" class="form-control bottom-margin-10">{if $signature} {$signature}{/if}</textarea> to... <textarea name="message" id="replymessage" rows="14" class="form-control bottom-margin-10">Hello {$clientname|strstr:' ':true},{if $signature} {$signature}{/if}</textarea> as you don't have direct access to any variables for the client's first name, you have to use {$clientname} which contains the client's full name, and then if you only want their first name, you can split it using some Smarty and remove the surname. 1 Quote Link to comment Share on other sites More sharing options...
Si Posted July 20, 2017 Author Share Posted July 20, 2017 Thanks Brian! Once again you come up 'trumps' (is that a word we're even allowed to use anymore)? Works a treat and shows just the first name every time. Great job!! 0 Quote Link to comment Share on other sites More sharing options...
Faizal1 Posted March 4, 2020 Share Posted March 4, 2020 Hello, I just tried this in the latest version and it didn't work. All I got was Hello , so the name is not being entered. I did have the smarty error but added strstr to the configuration file but still can't get the name. Tried everything I could think off so would love some help. Thanks. 0 Quote Link to comment Share on other sites More sharing options...
Si Posted March 4, 2020 Author Share Posted March 4, 2020 Running 7.9.2 (latest version as I type) and it continues to work a treat. No issues. I don't think much would change in the tpl files to stop this working. Works for account holders and additional account holders (dependent on whoever raises the support ticket). 1 Quote Link to comment Share on other sites More sharing options...
Faizal1 Posted March 4, 2020 Share Posted March 4, 2020 Hey thanks so much for the reply. I spent so much time yesterday trying everything i could and it refuses to pull the name. But now that i know it still works i'll keep trying to get it to work. It's a small thing but every bit counts. 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted March 4, 2020 Share Posted March 4, 2020 Wouldn't the easiest solution to just make you entire signature something like this? Hello [FIRSTNAME], Kind regards Name Surname All your base are belong to us LLC. That should work just fine 😄 0 Quote Link to comment Share on other sites More sharing options...
Faizal1 Posted March 7, 2020 Share Posted March 7, 2020 Just wanted to update and say it started working and perfectly. Pulls the first name actually which is great. Thanks @brian! and @Si. 0 Quote Link to comment Share on other sites More sharing options...
Kevin K Posted April 14, 2020 Share Posted April 14, 2020 On 7/20/2017 at 9:59 AM, brian! said: <textarea name="message" id="replymessage" rows="14" class="form-control bottom-margin-10">Hello {$clientname|strstr:' ':true},{if $signature} {$signature}{/if}</textarea> I have used this method for several years. My problem is sometimes sub-accounts submit support tickets and the "Hello $clientname" pulls up the main account holders name instead of the sub-accounts name. Is there any way to work around this aside from having to manually change the name in the ticket when it is a sub-account? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 15, 2020 Share Posted April 15, 2020 Hi Kevin, 19 hours ago, Kevin K said: I have used this method for several years. My problem is sometimes sub-accounts submit support tickets and the "Hello $clientname" pulls up the main account holders name instead of the sub-accounts name. Is there any way to work around this aside from having to manually change the name in the ticket when it is a sub-account? two ways - either in the template, or by using a hook to modify the content of the $signature value (though because of the template layout, that might still need to be edited).. so if you're going to do it in the template... <textarea name="message" id="replymessage" rows="14" class="form-control bottom-margin-10">Hello {$clientname|strstr:' ':true},{if $signature} {$signature}{/if}</textarea> becomes... <textarea name="message" id="replymessage" rows="14" class="form-control bottom-margin-10">Hello {if $contactname}{$contactname|strstr:' ':true}{else}{$clientname|strstr:' ':true}{/if},{if $signature} {$signature}{/if}</textarea> 0 Quote Link to comment Share on other sites More sharing options...
Kevin K Posted April 15, 2020 Share Posted April 15, 2020 5 minutes ago, brian! said: Hi Kevin, two ways - either in the template, or by using a hook to modify the content of the $signature value (though because of the template layout, that might still need to be edited).. so if you're going to do it in the template... <textarea name="message" id="replymessage" rows="14" class="form-control bottom-margin-10">Hello {$clientname|strstr:' ':true},{if $signature} {$signature}{/if}</textarea> becomes... <textarea name="message" id="replymessage" rows="14" class="form-control bottom-margin-10">Hello {if $contactname}{$contactname|strstr:' ':true}{else}{$clientname|strstr:' ':true}{/if},{if $signature} {$signature}{/if}</textarea> Thanks, that worked perfectly! 🙂 0 Quote Link to comment Share on other sites More sharing options...
sol2010 Posted July 8, 2021 Share Posted July 8, 2021 On 4/16/2020 at 3:24 AM, brian! said: Hi Kevin, two ways - either in the template, or by using a hook to modify the content of the $signature value (though because of the template layout, that might still need to be edited).. so if you're going to do it in the template... <textarea name="message" id="replymessage" rows="14" class="form-control bottom-margin-10">Hello {$clientname|strstr:' ':true},{if $signature} {$signature}{/if}</textarea> becomes... <textarea name="message" id="replymessage" rows="14" class="form-control bottom-margin-10">Hello {if $contactname}{$contactname|strstr:' ':true}{else}{$clientname|strstr:' ':true}{/if},{if $signature} {$signature}{/if}</textarea> Hi Brian Is this still the case? I just had a new client with about 4 different contacts. But whne the contact opens the email, they get the "Dear [account owner name]" So what's the best way to simply show "Hi [name of person that submitted the ticket] " Thanks 0 Quote Link to comment Share on other sites More sharing options...
sol2010 Posted July 9, 2021 Share Posted July 9, 2021 Hi @brian! Is this still the case? I just had a new client with about 4 different contacts. But whne the contact opens the email, they get the "Dear [account owner name]" So what's the best way to simply show "Hi [name of person that submitted the ticket] " Thanks 0 Quote Link to comment Share on other sites More sharing options...
Faizal1 Posted December 12, 2022 Share Posted December 12, 2022 Hi, just wondering if anyone knows how to make this change so that it doesn't get removed every time we update Whmcs? Thanks 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Danny Posted July 11 WHMCS Technical Analyst Share Posted July 11 On 12/12/2022 at 1:48 PM, Faizal1 said: Hi, just wondering if anyone knows how to make this change so that it doesn't get removed every time we update Whmcs? Thanks You would create your own WHMCS Template/Theme and then edit the template file viewticket.tpl as @brian! advised above. For more information on creating your own template/theme please review the following developer's documentation: https://developers.whmcs.com/themes/ The WHMCS updates will overwrite any changes made to the default Six and Twenty-one template directories under the templates directory that comes included with WHMCS. So, the first step is to create your own copy of the template. This ensures your customizations are not lost when updating. See: https://developers.whmcs.com/themes/getting-started/ There are two different methods for copying the template/theme files. Note: You should still check out any new changes for the template when you do update WHMCS in case you need to update your custom template. Please review number 3 in this guide for more information on keeping your custom theme/template updated: https://docs.whmcs.com/system/updates/update-tutorials/prepare-to-update-whmcs/ I hope this answers that question on how to keep your changes. 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.