Disable order confirmation email in PrestaShop

I trying to find out if there is a way or an addon that stops new order confirmation email to customers.

It seems to be hard coded in Prestashop 1.7

found in ps_emailalerts.php this code 

if ($dir_mail) {    Mail::Send(        $mail_id_lang,        'new_order',        sprintf(Mail::l('New order : #%d - %s', $mail_id_lang), $order->id, $order->reference),        $template_vars,        $merchant_mail,        null,        $configuration['PS_SHOP_EMAIL'],        $configuration['PS_SHOP_NAME'],        null,        null,        $dir_mail,        null,        $id_shop    );}

but it looks like merchant email and not customer email

Do you know if this is possible ? Don't want to stop all emails to customers. I send an invoice by Paypal and order confirmation is confusing to customers



Order confirmation mail - how to disable it?

Hello
ps_mailalerts module does not deliver the email to customer(s). Ps_mailalerts module delivers the message about order confirmation to show admin only.
The code that is responsible for email that shop sends to customer after purchase is located in /classes/paymentModule.php

there is a code like:
                        if (Validate::isEmail($this->context->customer->email)) {
                            Mail::Send(
                                (int) $order->id_lang,
                                'order_conf',
                                Context::getContext()->getTranslator()->trans(
                                    'Order confirmation',
                                    array(),
                                    'Emails.Subject',
                                    $orderLanguage->locale
                                ),
                                $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
                            );
                        }

So, it is enough to just alter this code (remove, or comment it).
Please note that some payment modules can have an own function to send email 'order confirmation' to customer after purchase, in such cases it will be required to alter the module code.
Share on Google Plus

About VEKIA

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

1 comments:

  1. hi, it doesn't work even after that code is removed from paymentmodule.php

    i use bankwire method default module.

    ReplyDelete