View Full Version : First Name only on replies
Ollie
08-24-2008, 01:43 AM
Hi all,
Would be nice when you reply to a ticket to only use customers first name only instead of the full (formal) name. Have tried changing '%name' to '%firstname' (on the template only) but this didn't work. Is this possible??? Any help appreciated
Thanks
Ollie:confused:
jpowers40828
08-27-2008, 07:04 PM
To add it to the autoresponse to new tickets
Add this code on about line 955 of include/class.ticket.php right after
$body = str_replace("%signature",$dept?$dept->getSignature():'',$body);
$seperate_names = explode(" ",$ticket->getName(),2);
$subj = str_replace("%firstname", $seperate_names[0], $subj);
$body = str_replace("%firstname", $seperate_names[0], $body);
$subj = str_replace("%lastname", $seperate_names[1], $subj);
$body = str_replace("%lastname", $seperate_names[1], $body);
jpowers40828
08-31-2008, 08:54 AM
To add it to the reply to existing tickets
Add code on about line 600 of include/class ticket.php right after
$body = str_replace("%message",$response,$body);
$seperate_names = explode(" ",$this->getName(),2);
$subj = str_replace("%firstname", $seperate_names[0], $subj);
$body = str_replace("%firstname", $seperate_names[0], $body);
$subj = str_replace("%lastname", $seperate_names[1], $subj);
$body = str_replace("%lastname", $seperate_names[1], $body);