Customer gets two mails on placing order

Developer
Nuo Romania
Narys nuo bal. 2019

Hi there.

I set up some order statuses and for all of them I have checked the Send mail option, so with changing order status the customer is getting a new mail. When customer is placing the order, the payment module assigns to the order the status - New order placed - and triggers sending a mail with all information needed configured.

The problem is, LiteCart is also sending a mail on placing order so the customer is getting two mails.

Is it possible to disable automatic sending of mail on just placed orders if the status assigned already triggers a mail to be sent?

tim
Founder
Nuo Sweden
Narys nuo geg. 2013
tim

LiteCart always send an order confirmation upon a successful order.

It does not have a turnkey so you need a vqmod disabling the rows in pages/order_process.inc.php.

Developer
Nuo Romania
Narys nuo bal. 2019

That's good to know. Thank you, Tim! And Merry Christmas!

tim
Founder
Nuo Sweden
Narys nuo geg. 2013
tim

Merry christmas :)

Moderator
Nuo United States
Narys nuo spal. 2019

@demographus  If you're still in need of a solution, I may have found one. 

On pages/order_process.inc.php, commenting out the following line will stop the sending of the cart email so only yours will get sent:

$order->email_order_copy($order->data['customer']['email'], $bccs, $order->data['language_code']);

If you only want to prevent certain emails from being sent, you could wrap that line in an if statement, e.g.


  $order->email_order_copy($order->data['customer']['email'], $bccs, $order->data['language_code']);
}```

HTH
This thread has been closed due to long inactivity. Posting to it is not possible.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.