Asu34 Posted January 27, 2022 Share Posted January 27, 2022 Bonjour à tous, Prestashop envoie automatiquement un mail d'avoir lorsqu'on en génère un. Mon problème et qu'ils reçoivent ce 1er mail, puis un second quand je change le statut de la commande en remboursé. Je souhaiterais qu'ils ne reçoivent plus celui de l'avoir généré mais uniquement celui du changement de statut à remboursé... Vous auriez une idée ? Merci Link to comment Share on other sites More sharing options...
Eolia Posted January 27, 2022 Share Posted January 27, 2022 Commentez tout ce bloc dans AdminOrderController.php Link to comment Share on other sites More sharing options...
Asu34 Posted February 1, 2022 Author Share Posted February 1, 2022 Bonjour @Eolia et merci pour ta réponse (j étais passé à travers d'où ce laps de temps avec ce message). De mon côté dans AdminOrderController.php j'ai ces lignes (différentes visiblement des tiennes) : if (!OrderSlip::create($order, $product_list, $shipping, $voucher, $choosen)) { $this->errors[] = $this->trans('A credit slip cannot be generated.', array(), 'Admin.Orderscustomers.Notification'); } else { Hook::exec('actionOrderSlipAdd', array('order' => $order, 'productList' => $full_product_list, 'qtyList' => $full_quantity_list), null, false, true, false, $order->id_shop); $orderLanguage = new Language((int) $order->id_lang); @Mail::Send( (int) $order->id_lang, 'credit_slip', $this->trans( 'New credit slip regarding your order', array(), 'Emails.Subject', $orderLanguage->locale ), $params, $customer->email, $customer->firstname . ' ' . $customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int) $order->id_shop ); } } Dois-je de mon côté commenter : $orderLanguage = new Language((int) $order->id_lang); @Mail::Send( (int) $order->id_lang, 'credit_slip', $this->trans( 'New credit slip regarding your order', array(), 'Emails.Subject', $orderLanguage->locale ), $params, $customer->email, $customer->firstname . ' ' . $customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int) $order->id_shop ); ? Merci par avance Link to comment Share on other sites More sharing options...
Eolia Posted February 1, 2022 Share Posted February 1, 2022 Oui avec /* au début et */ à la fin de ce bloc if (!OrderSlip::create($order, $product_list, $shipping, $voucher, $choosen)) { $this->errors[] = $this->trans('A credit slip cannot be generated.', array(), 'Admin.Orderscustomers.Notification'); } else { Hook::exec('actionOrderSlipAdd', array('order' => $order, 'productList' => $full_product_list, 'qtyList' => $full_quantity_list), null, false, true, false, $order->id_shop); /*$orderLanguage = new Language((int) $order->id_lang); @Mail::Send( (int) $order->id_lang, 'credit_slip', $this->trans( 'New credit slip regarding your order', array(), 'Emails.Subject', $orderLanguage->locale ), $params, $customer->email, $customer->firstname . ' ' . $customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int) $order->id_shop );*/ } } Link to comment Share on other sites More sharing options...
Asu34 Posted February 1, 2022 Author Share Posted February 1, 2022 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