daftfunk Posted September 28, 2012 Share Posted September 28, 2012 (edited) Bonsoir! Une petite question en ce début de WE if (!empty($contact->email)) { $id_order = (int)Tools::getValue('id_order', 0); $order = new Order($id_order); $mail_var_list = array( '{email}' => $from, '{message}' => Tools::nl2br(stripslashes($message)), '{id_order}' => $id_order, '{order_name}' => $order->getUniqReference(), '{attached_file}' => isset($_FILES['fileUpload'], $_FILES['fileUpload']['name']) ? $_FILES['fileUpload']['name'] : '' ); if (Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form'), $mail_var_list, $contact->email, $contact->name, $from, ($customer->id ? $customer->firstname.' '.$customer->lastname : ''), $fileAttachment) && Mail::Send($this->context->language->id, 'contact_form', Mail::l('Your message has been correctly sent'), $mail_var_list, $from)) $this->context->smarty->assign('confirmation', 1); else $this->errors[] = Tools::displayError('An error occurred while sending message.'); } Ce petit bout de code décrit la formation et l'envois du mail contact - Ce que je voudrais comprendre c'est ou on fait appelle au tpl contact.html pour envoyer les infos. mon but étant de générer ces infos avec un autre tpl naturellement Merci de votre patience B Edited September 30, 2012 by daftfunk (see edit history) Link to comment Share on other sites More sharing options...
daftfunk Posted September 28, 2012 Author Share Posted September 28, 2012 (edited) j'ai trouvé mais c'est tellement évident que j'en suis honteux if (Mail::Send($this->context->language->id, 'XXXX', Mail::l('Message from contact form'), $mail_var_list, $contact->email, $contact->name, $from, ($customer->id ? $customer->firstname.' '.$customer->lastname : ''), $fileAttachment) && Mail::Send($this->context->language->id, 'XXXX', Mail::l('Your message has been correctly sent'), $mail_var_list, $from)) $this->context->smarty->assign('confirmation', 1); les XXXX c'est le nom du tpl mais il faut veiller a mettre les .html et .txt Voila Edited September 30, 2012 by daftfunk (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now