Page 1 of 1
Disable Admin order alert email
Posted: Thu Jun 01, 2017 9:45 pm
by fantastico
Hello,
How can i disable the email sent to admin on order success in oc 2.3.0.2?
I tried commenting out the following in /catalog/model/checkout/order.php but this gives error on order status history update.
Code: Select all
// Admin Alert Mail
//if (in_array('order', (array)$this->config->get('config_mail_alert'))) {
//$subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id);
Thanks.
Re: Disable Admin order alert email
Posted: Fri Jun 02, 2017 12:45 am
by sdsoftware
On the same file catalog/model/checkout/order Find and Comment out the first
After the lines you Posted. For me its line #746 before the comment
Code: Select all
// Send to additional alert emails
be carefull cause there are other sentmail inits there. For the Customers etc dotn disable those!!!
Also If you go to store->settingd->mail i Think you can Uncheck the notification under "MAIL ALLERTS"
Re: Disable Admin order alert email
Posted: Fri Jun 02, 2017 1:16 am
by fantastico
Thanks sdsoftware for your reply.
Actually it is the second $mail->send(); the first one is on line 658. is it correct and the same on your end?
In store->settings->mail is only for additional emails, it does not affect the main admin order emails.
Many thanks.
Re: Disable Admin order alert email
Posted: Fri Jun 02, 2017 2:23 am
by sdsoftware
You are welcome.
Actually it is the second $mail->send(); the first one is on line 658. is it correct and the same on your end?
Yes thats what I am trying to explain but my English are getting Worse when I am in a hurry!
Try->catch->error And you will find the solution

Its one of those for sure.
In store->settings->mail is only for additional emails, it does not affect the main admin order emails.
Oh I see.. Thank you for the Info :-)
Re: Disable Admin order alert email
Posted: Fri Jun 02, 2017 8:26 pm
by fantastico
Thanks for your help sdsoftware. can you please explain how to use Try->catch->error for finding out the correct one?
Can anyone confirm which $mail->send(); should be commented out to stop admin order emails?
Re: Disable Admin order alert email
Posted: Fri Jun 02, 2017 11:18 pm
by sdsoftware
Its a phrase me and my team use . It means give it a try on test environment.
TRY - > commenting the second one
Place a test order
Catch the error -> If there is one.
See if it worked. If didnt send you a mail then you commented the right one.
Ans it is the one before the comment "// Send to additional alert emails"!
Re: Disable Admin order alert email
Posted: Sun Jun 04, 2017 8:10 pm
by fantastico
Many thanks sdsoftware!