vincentmelrose Posted October 30, 2013 Share Posted October 30, 2013 Bonjour, Je ne parviens pas à rajouter un envoi de mail automatique depuis l'onglet CLIENT du back office prestashop v1.3 J'ai réussi à rajouter un textearea pour intégrer des notes mais j'aimerai que le client le reçoive par mail or le mail ne part pas... Voici mon code de la page ajax.php if (Tools::isSubmit('submitCustomerNote2') AND $id_customer = (int)Tools::getValue('id_customer')) { $note = html_entity_decode(Tools::getValue('note2')); $varsTpl2 = array('{lastname}' => 'test', '{firstname}' => 'test', '{id_order}' => '5', '{message}' => 'test'); if (!empty($note) AND !Validate::isCleanHtml($note)) die ('error:validation'); if (!Db::getInstance()->Execute('UPDATE '._DB_PREFIX_.'customer SET `note` = "'.pSQL($note, true).'" WHERE id_customer = '.(int)$id_customer.' LIMIT 1')) die ('error:update'); if (!Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'message_client (message, id_customer, id_employee, private, date_add) values ("'.pSQL($note, true).'", "'.(int)$id_customer.'","'.(int)$id_employee.'", "0", NOW()) ')) if (@Mail::Send(intval($cookie->id_lang), 'order_merchant_comment', 'test', $varsTpl2, '[email protected]', 'test')) die ('error:insert'); die('ok'); } Tout fonctionne sauf l'envoi du mail??? Je ne comprend pas Merci de votre aide Link to comment Share on other sites More sharing options...
vincentmelrose Posted November 4, 2013 Author Share Posted November 4, 2013 Personne pour m'aider ??? 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