Page 1 of 1

Duplicate Order Comments in Order Email

Posted: Sat Jul 07, 2018 3:50 am
by AM786
Hi,

We're receiving duplicate order comments in our order emails. How can this be corrected?

Re: Duplicate Order Comments in Order Email

Posted: Sat Jul 07, 2018 10:24 pm
by straightlight
As a new forum user, please read the forum rules.

- No OC version posted
- Vague information posted

What does your first post really describes in order to gather information on how to solved the issue? More information is needed.

Re: Duplicate Order Comments in Order Email

Posted: Sat Jul 07, 2018 11:50 pm
by AM786
v2.3.0.2

Re: Duplicate Order Comments in Order Email

Posted: Sat Jul 07, 2018 11:54 pm
by AM786
Another issue

jquery-2.1.1.min.js [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

v2.3.0.2

Just seeing if these problems have occurred with others and if a solution exists.

Re: Duplicate Order Comments in Order Email

Posted: Sun Jul 08, 2018 12:52 am
by straightlight
Your jQuery version is outdated. As described on the error message, it is deprecated and needs to be upgraded.

Re: Duplicate Order Comments in Order Email

Posted: Sun Jul 08, 2018 1:34 am
by AM786
Tried updating jQuery to 3.3.1 but no luck

Re: Duplicate Order Comments in Order Email

Posted: Sun Jul 08, 2018 2:03 am
by straightlight
An extension may be using older codes. Uninstall each extensions until this error vanishes.

Re: Duplicate Order Comments in Order Email

Posted: Sun Jul 08, 2018 2:42 am
by AM786
I was able to find the extension and sent an email to the Developer for a solution. Thanks.

Now about this other problem. The comments are shown twice for orders in the emails we receive about the order. Do you think this is also because of an extension?

Re: Duplicate Order Comments in Order Email

Posted: Sun Jul 08, 2018 2:58 am
by straightlight
As instructed on the above, uninstall each extensions until the issue gets rectified, this time, with the order comments.

Re: Duplicate Order Comments in Order Email

Posted: Sun Jul 08, 2018 3:10 am
by AM786
Thanks for your help man, I sincerely appreciate it :)

Re: Duplicate Order Comments in Order Email

Posted: Tue Feb 19, 2019 7:08 am
by AM786
I found an entry in catalog/model/checkout/order.php which seems to be astray

Code: Select all

					if ($comment) {
						if ($order_info['comment']) {
							$data['comment'] = nl2br($comment) . '<br/><br/>' . $order_info['comment'];
						} else {
							$data['comment'] = nl2br($comment);
						}
					} else {
						if ($order_info['comment']) {
							$data['comment'] = $order_info['comment'];
						} else {
							$data['comment'] = '';
						}
					}
Specifically

Code: Select all

$data['comment'] = nl2br($comment) . '<br/><br/>' . $order_info['comment'];
I see two posts for comment, which is why I am seeing double, right?

Re: Duplicate Order Comments in Order Email

Posted: Tue Feb 19, 2019 10:29 pm
by straightlight
Using an old OC version. The if statement with the $comment or $order_info['comment'] has been fixed since quite sometime now.