Post by sergius79 » Sat Nov 11, 2017 8:32 pm

Hi everyone!

I have OC 3.0.2.0 + Journal2 theme.

When I testing ordering noticed that client receive email with full order details, but oc administrator only short version (no client name, no contacts):
Client email notification: http://prntscr.com/h92558
Admin order email notification: http://prntscr.com/h925hw

How can admin receive also full order email notification?

Newbie

Posts

Joined
Thu Nov 24, 2016 6:01 am

Post by straightlight » Sat Nov 11, 2017 11:21 pm

Use a fresh installation of Opencart and see if the admin email template notification also use a short version compared to the Journal2 theme edition.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

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

Post by sergius79 » Sun Nov 12, 2017 5:02 pm

But where is the admin order email template?
I have found file /public_html/catalog/view/theme/default/template/mail/order_alert.twig which has admin mail template code http://prntscr.com/h9dotc
I have tried to change code to be sure this template is really used for admin mails but without changes. So, I am not sure this file is used.

Journal2 doesn't have it own mail template folder /public_html/catalog/view/theme/journal2/template/??????

Newbie

Posts

Joined
Thu Nov 24, 2016 6:01 am

Post by straightlight » Sun Nov 12, 2017 9:59 pm

If the order_alert.twig file can be found on the core but not on the journal2 especially with so many question marks, then clearly the issue is with Journal2. Contact the extension publisher to resolve this issue. The order alert is working fine with the core. As for the admin emails, they are located in the admin/view/template/mail folder.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

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

Post by sebastiaank » Tue Nov 14, 2017 6:02 am

What you can easily do, is go to Design --> layout theme edit and copy the twig contents of mail/order_add.twig and paste it into mail/order_alert.twig.
you will get an exact copy of what a customer gets.

Newbie

Posts

Joined
Tue Nov 14, 2017 5:58 am

Post by rkeles » Thu Jan 18, 2018 9:55 pm

I have the same problem. admin email notifications comes with text format, not in HTML?
Does it have any solition?

Image


Newbie

Posts

Joined
Mon Mar 06, 2017 7:56 pm

Post by rkeles » Tue Feb 06, 2018 6:48 pm

No solisions?

Image


Newbie

Posts

Joined
Mon Mar 06, 2017 7:56 pm

Post by straightlight » Wed Feb 07, 2018 6:20 am

rkeles wrote:
Thu Jan 18, 2018 9:55 pm
I have the same problem. admin email notifications comes with text format, not in HTML?
Does it have any solition?
No OC version posted.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

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

Post by siptec » Wed Mar 14, 2018 4:29 am

sebastiaank wrote:
Tue Nov 14, 2017 6:02 am
What you can easily do, is go to Design --> layout theme edit and copy the twig contents of mail/order_add.twig and paste it into mail/order_alert.twig.
you will get an exact copy of what a customer gets.
This answer does not work. The Admin receives not formatted HTML code in the email. There has to be a way for OC 3.0.2.0 to send and email to the administrator giving them the same information as the customer gets. OC 2.x was easy to change this email format...

Any help would be appreciated.

User avatar
New member

Posts

Joined
Mon Sep 17, 2012 11:32 pm

Post by IP_CAM » Wed Mar 14, 2018 5:20 am

Well, the good News is, that a Solution for OC v.3.x Versions already exists, as it looks! :D
And the bad News is, that latest Version Software Users don't find much free stuff yet... :P
But one cannot always have everything, just like in real life...
Ernie
---
Admin Email Enhancer 3 paid, OC v.3.0.0.0, 3.0.1.1, 3.0.1.2, 3.0.2.0, 3.0.3.0b:
Get rid of that text email sent to Admins on receipt of an Order.
Receive a fully formatted email containing all of the data you'll need to complete the Order:
@ Your Logo
@ Order Details: Payment method, Shipping Method, Customer details
@ Payment and Shipping addresses
@ Customer comments
@ Product details - including ordered options
@ Full totals information
@ NEW - Now includes configurable product photo(s)
---
https://www.opencart.com/index.php?rout ... n_id=32152
---
Image
Image

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'200+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by anatom09 » Fri Aug 10, 2018 11:52 pm

This one, free extension, works. Solves this problem: https://www.opencart.com/index.php?rout ... _license=0

Newbie

Posts

Joined
Sat Jul 07, 2018 1:00 pm

Post by guspel » Wed Mar 20, 2019 8:17 pm

Sorry for my English
For Opencart 3.0.2.0
catalog/controller/mail/order.php

Search

Code: Select all

send();
replace by (on all occasions)

Code: Select all

send();
$this->sameAdminAlert($order_info,$data);
Search

Code: Select all

public function add($order_info, $order_status_id, $comment, $notify)
Replace by

Code: Select all

		
	public function sameAdminAlert($order_info, $data) {
		if (in_array('order', (array)$this->config->get('config_mail_alert'))) {
			$data['text_greeting'] = 'You have a new order - '.$order_info['order_id'];
			
			$mail = new Mail($this->config->get('config_mail_engine'));
			$mail->parameter = $this->config->get('config_mail_parameter');
			$mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
			$mail->smtp_username = $this->config->get('config_mail_smtp_username');
			$mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
			$mail->smtp_port = $this->config->get('config_mail_smtp_port');
			$mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');
			
			$mail->setTo($this->config->get('config_email'));
			$mail->setFrom($this->config->get('config_email'));
			$mail->setSender(html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
			$mail->setSubject(html_entity_decode($order_info['store_name'] . ' - ' . $data['text_greeting'], ENT_NOQUOTES, 'UTF-8'));
			$mail->setHtml($this->load->view('mail/order_add', $data));
			$mail->send();
			
			// Send to additional alert emails
			$emails = explode(',', $this->config->get('config_mail_alert_email'));
			
			foreach ($emails as $email) {
				if ($email && filter_var($email, FILTER_VALIDATE_EMAIL)) {
					$mail->setTo($email);
					$mail->send();
				}
			}
		}
	}
	public function add($order_info, $order_status_id, $comment, $notify)

It worked for me correctly

Newbie

Posts

Joined
Fri Oct 28, 2011 10:43 am

Post by originalstormcrow » Tue Sep 03, 2019 10:54 pm

Guspel, your solution worked great.. Thank you!
It is not a real problem but now we get 3 order notifications.
1. orignal normal email notification of order.
2. an email that looks like it is saysing the order is completed.
3. is an email we want to keep with all the order details. Its beautiful.
Is there a way of just having the last email without the others.
Thank you.


Posts

Joined
Fri Apr 14, 2017 12:07 pm
Who is online

Users browsing this forum: No registered users and 28 guests