Eutanasio Posted July 26, 2019 Share Posted July 26, 2019 Bonjour, Quand on modifie une commande, le client reçois un email, je veux aussi le recevoir comme administrateur pour fair un bon suivi, est-il possible? Merci Link to comment Share on other sites More sharing options...
Eolia Posted July 27, 2019 Share Posted July 27, 2019 Oui, il faut rajouter l'email désiré dans le code de mailalerts, fonction hookActionOrderEdited($params), 14ème paramètre de la fonction Mail::Send() Link to comment Share on other sites More sharing options...
Eolia Posted July 27, 2019 Share Posted July 27, 2019 Citation Tiri a dit : Bonjour Eolia, ou puis je trouver mailalert pour modifier le code ? Je suis sous presta 1.7 et tente de trouver par ftp mais rien du tout 😉 🙂 Merci si tu as le chemin... Tres bonne journée Aucune idée, je refuse de travailler sur les 1.7 Link to comment Share on other sites More sharing options...
Eutanasio Posted July 27, 2019 Author Share Posted July 27, 2019 8 hours ago, Eolia said: Oui, il faut rajouter l'email désiré dans le code de mailalerts, fonction hookActionOrderEdited($params), 14ème paramètre de la fonction Mail::Send() Thanks! I found it in the route modules / ps_emailalerts / ps_emailalerts.php How should I properly modify it to add the store email in copy? public function hookActionOrderEdited($params) { if (!$this->order_edited || empty($this->order_edited)) { return; } $order = $params['order']; $data = array( '{lastname}' => $order->getCustomer()->lastname, '{firstname}' => $order->getCustomer()->firstname, '{id_order}' => (int) $order->id, '{order_name}' => $order->getUniqReference(), ); Mail::Send( (int) $order->id_lang, 'order_changed', Mail::l('Your order has been changed', (int) $order->id_lang), $data, $order->getCustomer()->email, $order->getCustomer()->firstname.' '.$order->getCustomer()->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int) $order->id_shop); } Thanks! Link to comment Share on other sites More sharing options...
Eolia Posted July 27, 2019 Share Posted July 27, 2019 After (int) $order->id_shop add a comma and your email Mail::Send( (int) $order->id_lang, 'order_changed', Mail::l('Your order has been changed', (int) $order->id_lang), $data, $order->getCustomer()->email, $order->getCustomer()->firstname.' '.$order->getCustomer()->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int) $order->id_shop, '[email protected]'); 1 Link to comment Share on other sites More sharing options...
Eutanasio Posted July 29, 2019 Author Share Posted July 29, 2019 Une autre question svp, comment faire pour ajouter plusieurs emails? avec virgule peut être? ou virgule et espace? Merci! Link to comment Share on other sites More sharing options...
Eolia Posted July 29, 2019 Share Posted July 29, 2019 Le code de Prestashop n'offre pas la possibilité de mettre plusieurs destinataires en copie cachée. (il faudrait modifier Swift RecipientList.php) Si vous en voulez plusieurs il faut les mettre dans un tableau, avec celui du client à la place de $order->getCustomer()->email array($order->getCustomer()->email, 'mail1, 'mail2', etc) Mais le client verra les autres destinataires. Autrement vous renvoyez vers une boite mail générique chez votre hébergeur qui, elle, est configurée pour faire suivre à plusieurs destinataires. Link to comment Share on other sites More sharing options...
Eutanasio Posted July 30, 2019 Author Share Posted July 30, 2019 😅that was pretty smart, je opte pour configurer un nouveau email avec des rédirections... merci! 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