Open rmilecki opened 4 years ago
Code responsible for sending e-mails for a new order can be found in PaymentModule.php
in the validateOrder()
. First it sends e-mail related to the order state:
// Set the order status
$new_history = new OrderHistory();
$new_history->id_order = (int) $order->id;
$new_history->changeIdOrderState((int) $id_order_state, $order, true);
$new_history->addWithemail(true, $extra_vars);
and later it sends e-mail confirming an order:
// 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) {
(...)
}
Unfortunately I'm not experienced enough with PrestaShop code to fix it on my own.
I think it's not a duplicate of #17332 (unless I'm wrong) but they may be related. It may be worth to consider both issues while fixing any of them.
Hi @rmilecki,
Thanks for your report.
I think it could be an improvement more than a bug.
I have the same behavior as PS1.7.6.3 & PS1.7.5.2
The order_conf
email is received after the preparation
email.
First expected e-mail:
order_conf
First received e-mail:preparation
Ping @PrestaShop/prestashop-product-team what do you think of this improvement?
Thanks!
@rmilecki, If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!
@LouiseBonnard it seems like it is a comment we have already had in the past about the confusing content used in the order conf email. Do you remember if we already have such issue in the backlog ?
Describe the bug When placing an order most users (customers) expect to receive order confirmation e-mail followed by status update e-mails. PresaShop first sends e-mail about order state and then e-mail confirming is has been placed.
To Reproduce Steps to reproduce the behavior:
First expected e-mail:
order_conf
First received e-mail:preparation
Additional information PrestaShop version: 1.7.6.2 PHP version: 7.1.33