Post by mupcku » Thu Apr 23, 2020 3:14 pm

Hi there!
I had a troubles with the subject line, but hope you will understand me now...
What i want to achieve is when i change the order status from missing to any other status (or for example from order_status_id=0 to order_status_id=16) TO STOP SENDING confirmation email to client.
Is it possible and how?
OC version is 2.3.0.2.
I tried to change this line on catalog/model/checkout/order.php

Code: Select all

$mail->send();
to this

Code: Select all

if ($order_status_id!=16) {
					$mail->send();
				}
But nothing happens.
Also trued this on the same file, before this line:

Code: Select all

$mail = new Mail();
added this:

Code: Select all

if ($order_info['order_status_id']=16) {
					die();
				}
Again nothing helps. When i change order status from missing order to order status 16 - the client is recieving confirmation email. How to prevent this?
Thank you!

https://wedeom.bg
Image


Active Member

Posts

Joined
Tue Jan 24, 2017 8:12 pm

Post by straightlight » Thu Apr 23, 2020 7:56 pm

That is because the addOrderHistory is launched with JSON Encoding. If you don't see any differences after modifying a file, you are either experiencing cache or time zone issues. Also ensure to edit your files with UTF-8 without BOM format prior to uploads.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by mupcku » Fri Apr 24, 2020 2:42 am

straightlight wrote:
Thu Apr 23, 2020 7:56 pm
you are either experiencing cache or time zone issues. Also ensure to edit your files with UTF-8 without BOM format prior to uploads.
Im clearing all the cache but again nothing changes...

https://wedeom.bg
Image


Active Member

Posts

Joined
Tue Jan 24, 2017 8:12 pm

Post by straightlight » Fri Apr 24, 2020 5:03 am

Any extensions installed from your OC admin - > extensions - > modifications page?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by mupcku » Fri Apr 24, 2020 9:04 pm

straightlight wrote:
Fri Apr 24, 2020 5:03 am
Any extensions installed from your OC admin - > extensions - > modifications page?
I didnt understand....

https://wedeom.bg
Image


Active Member

Posts

Joined
Tue Jan 24, 2017 8:12 pm

Post by straightlight » Fri Apr 24, 2020 9:14 pm

mupcku wrote:
Fri Apr 24, 2020 9:04 pm
straightlight wrote:
Fri Apr 24, 2020 5:03 am
Any extensions installed from your OC admin - > extensions - > modifications page?
I didnt understand....
Any extensions installed on your store?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by mupcku » Fri Apr 24, 2020 9:20 pm

straightlight wrote:
Fri Apr 24, 2020 9:14 pm
Any extensions installed on your store?
I found the solution...
I want, when changing an order status from missing to status with id 16, to disable the standart order emails.
So i changed this line:

Code: Select all

// If order status is 0 then becomes greater than 0 send main html email
			if (!$order_info['order_status_id'] && $order_status_id) {
To this:

Code: Select all

// If order status is 0 then becomes greater than 0 send main html email
			if (!$order_info['order_status_id'] && $order_status_id != 16) {

https://wedeom.bg
Image


Active Member

Posts

Joined
Tue Jan 24, 2017 8:12 pm
Who is online

Users browsing this forum: Bing [Bot] and 239 guests