Jump to content

[SOLVED]customer support email


Recommended Posts

Posted (edited)

Hello guys,
By any chance does anybody knows how to add fistname and lastname in email generated by customer support.
My store is with prestashop 1.6 and all customers are registered... in customer support email (contact-us) only gives customer email. 
Thanks in advance.

Edited by ruisonika (see edit history)

Share this post


Link to post
Share on other sites

Hello i found it and i wanna share for someone who needs it.

In ContactController.php around 169 line after if ($contact->customer_service) { code inside and when it ends} here add the query you and for example let's find firstname.
 

$var = (int)$customer->id;
$sql = "
SELECT firstname FROM ps_customer WHERE id_customer = $var
";

$nome = Db::getInstance()->ExecuteS($sql);

Then few lines down,
 

if (!count($this->errors)) {
$var_list = array(
'{order_name}' => '-',
'{attached_file}' => '-',
'{message}' => Tools::nl2br(stripslashes($message)),
'{email}' =>  $from,
'{firstname}' =>  $nome,
'{product_name}' => '',
);

And in backoffice translate contact email and add the field {firstname} in the place you want.
That's all!

Share this post


Link to post
Share on other sites
  • ruisonika changed the title to [SOLVED]customer support email

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
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More