From 3f93a729c1e8f5d80ca82c803e8f8d01e5352728 Mon Sep 17 00:00:00 2001 From: dMetzger Date: Thu, 8 Nov 2012 13:33:12 +0000 Subject: [PATCH] [-] FO : missing vars in contact email replaced #PSCFV-4852 --- controllers/front/ContactController.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/controllers/front/ContactController.php b/controllers/front/ContactController.php index 519b2934c..a16dbdb6d 100644 --- a/controllers/front/ContactController.php +++ b/controllers/front/ContactController.php @@ -181,7 +181,21 @@ class ContactControllerCore extends FrontController if ($cm->add()) { if (empty($contact->email)) - Mail::Send($this->context->language->id, 'contact_form', Mail::l('Your message has been correctly sent'), array('{message}' => stripslashes($message)), $from); + { + $var_list = array( + '{order_name}' => '-', + '{attached_file}' => '-', + '{message}' => stripslashes($message) + ); + if ($ct->id_order) + { + $order = new Order($ct->id_order); + $var_list['{order_name}'] = $order->reference; + } + if (isset($filename)) + $var_list['{attached_file}'] = $_FILES['fileUpload']['name']; + Mail::Send($this->context->language->id, 'contact_form', Mail::l('Your message has been correctly sent'), $var_list, $from); + } $this->context->smarty->assign('confirmation', 1); } else