Jump to content

Hello {$client_first_name} in support ticket reply


Si

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

I was just being sarcastic.

there's nothing wrong with a bit of sarcasm on a Thursday! :idea:

 

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. :idea:

Link to comment
Share on other sites

  • 2 years later...

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...
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?

 

Link to comment
Share on other sites

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>
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 year later...
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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...
  • WHMCS Technical Analyst
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.

Link to comment
Share on other sites

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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