Falcaol Posted October 4, 2021 Share Posted October 4, 2021 Bonjour, Je suis sous Prestashop 1.6. J'ai commandé sur mon propre site pour tester celui ci et je me suis rendu compte que je ne recevais pas l'email confirmant ma commande. Je reçois bien le mail sur ma boite support comme quoi quelqu'un a commandé un article , mais pas d'email envoyé au client J'ai réinitialisé et vérifié que Mail Alert soi à jour, configurer les mails en SMPT J'ai fais un test mail et je reçois bien l'email de test Je ne trouve pas d'autres solutions Pourriez-vous m'aider s'il vous plait ? Link to comment Share on other sites More sharing options...
kerlin Posted October 4, 2021 Share Posted October 4, 2021 Bonjour, Vérifier dans les états de commande que l'état de confirmation de commande est bien prévu pour envoyer un mail au client Link to comment Share on other sites More sharing options...
Eolia Posted October 4, 2021 Share Posted October 4, 2021 MailAlert envoie un mail au commerçant mais pas au client, c'est Prestashop qui l'envoie directement lors de la validation de commande. Consultez le fichier error.log de votre serveur car il doit y avoir un souci dans certains de vos templates mail (manquant dans la langue ou syntaxe incorrecte) Classe PaymentModule ligne 674: // Order is reloaded because the status just changed $order = new Order((int)$order->id); // Send an e-mail to customer (one order = one email) if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && $this->context->customer->id) { $invoice = new Address((int)$order->id_address_invoice); $delivery = new Address((int)$order->id_address_delivery); $delivery_state = $delivery->id_state ? new State((int)$delivery->id_state) : false; $invoice_state = $invoice->id_state ? new State((int)$invoice->id_state) : false; $data = array( '{firstname}' => $this->context->customer->firstname, '{lastname}' => $this->context->customer->lastname, '{email}' => $this->context->customer->email, '{delivery_block_txt}' => $this->_getFormatedAddress($delivery, "\n"), '{invoice_block_txt}' => $this->_getFormatedAddress($invoice, "\n"), '{delivery_block_html}' => $this->_getFormatedAddress($delivery, '<br />', array( 'firstname' => '<span style="font-weight:bold;">%s</span>', 'lastname' => '<span style="font-weight:bold;">%s</span>' )), '{invoice_block_html}' => $this->_getFormatedAddress($invoice, '<br />', array( 'firstname' => '<span style="font-weight:bold;">%s</span>', 'lastname' => '<span style="font-weight:bold;">%s</span>' )), '{delivery_company}' => $delivery->company, '{delivery_firstname}' => $delivery->firstname, '{delivery_lastname}' => $delivery->lastname, '{delivery_address1}' => $delivery->address1, '{delivery_address2}' => $delivery->address2, '{delivery_city}' => $delivery->city, '{delivery_postal_code}' => $delivery->postcode, '{delivery_country}' => $delivery->country, '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', '{delivery_phone}' => ($delivery->phone) ? $delivery->phone : $delivery->phone_mobile, '{delivery_other}' => $delivery->other, '{invoice_company}' => $invoice->company, '{invoice_vat_number}' => $invoice->vat_number, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address2, '{invoice_address1}' => $invoice->address1, '{invoice_city}' => $invoice->city, '{invoice_postal_code}' => $invoice->postcode, '{invoice_country}' => $invoice->country, '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', '{invoice_phone}' => ($invoice->phone) ? $invoice->phone : $invoice->phone_mobile, '{invoice_other}' => $invoice->other, '{order_name}' => $order->getUniqReference(), '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), null, 1), '{carrier}' => ($virtual_product || !isset($carrier->name)) ? Tools::displayError('No carrier') : $carrier->name, '{payment}' => Tools::substr($order->payment, 0, 32), '{products}' => $product_list_html, '{products_txt}' => $product_list_txt, '{discounts}' => $cart_rules_list_html, '{discounts_txt}' => $cart_rules_list_txt, '{total_paid}' => Tools::displayPrice($order->total_paid, $this->context->currency, false), '{total_products}' => Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? $order->total_products : $order->total_products_wt, $this->context->currency, false), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $this->context->currency, false), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $this->context->currency, false), '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $this->context->currency, false), '{total_tax_paid}' => Tools::displayPrice(($order->total_products_wt - $order->total_products) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl), $this->context->currency, false)); if (is_array($extra_vars)) { $data = array_merge($data, $extra_vars); } // Join PDF invoice if ((int)Configuration::get('PS_INVOICE') && $order_status->invoice && $order->invoice_number) { $order_invoice_list = $order->getInvoicesCollection(); Hook::exec('actionPDFInvoiceRender', array('order_invoice_list' => $order_invoice_list)); $pdf = new PDF($order_invoice_list, PDF::TEMPLATE_INVOICE, $this->context->smarty); $file_attachement['content'] = $pdf->render(false); $file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf'; $file_attachement['mime'] = 'application/pdf'; } else { $file_attachement = null; } if (self::DEBUG_MODE) { PrestaShopLogger::addLog('PaymentModule::validateOrder - Mail is about to be sent', 1, null, 'Cart', (int)$id_cart, true); } if (Validate::isEmail($this->context->customer->email)) { Mail::Send( (int)$order->id_lang, 'order_conf', Mail::l('Order confirmation', (int)$order->id_lang), $data, $this->context->customer->email, $this->context->customer->firstname.' '.$this->context->customer->lastname, null, null, $file_attachement, null, _PS_MAIL_DIR_, false, (int)$order->id_shop ); } } Link to comment Share on other sites More sharing options...
Eolia Posted October 4, 2021 Share Posted October 4, 2021 il y a 1 minute, kerlin a dit : Bonjour, Vérifier dans les états de commande que l'état de confirmation de commande est bien prévu pour envoyer un mail au client La confirmation de commande n'utilise pas les états pour envoyer ce mail^^ Link to comment Share on other sites More sharing options...
kerlin Posted October 4, 2021 Share Posted October 4, 2021 il y a 3 minutes, Eolia a dit : La confirmation de commande n'utilise pas les états pour envoyer ce mail^^ mince j'ai été trop vite et pas vérifié avant 😉 merci Eolia ! Link to comment Share on other sites More sharing options...
Falcaol Posted October 4, 2021 Author Share Posted October 4, 2021 Désolé, j'avoue que je suis un peu perdu... Je ne sais pas du tout ou trouver ce fichier error.log 😭 Dois-je aller dans les logs sur OVH ? Depuis tout a l'heure je cherche mais je ne trouve pas ce fichier error... Merci d'avance Link to comment Share on other sites More sharing options...
Eolia Posted October 4, 2021 Share Posted October 4, 2021 Oui, chez OVH dans l'onglet Logs et statistiques de mémoire. Autrement, activez le mode debug et passez une commande de test, vous verrez l'erreur en direct. 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