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?
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?
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.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
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/??????
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/??????
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.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
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.
you will get an exact copy of what a customer gets.
No OC version posted.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
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...sebastiaank wrote: ↑Tue Nov 14, 2017 6:02 amWhat 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.
Any help would be appreciated.
Well, the good News is, that a Solution for OC v.3.x Versions already exists, as it looks!
And the bad News is, that latest Version Software Users don't find much free stuff yet...
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
---
And the bad News is, that latest Version Software Users don't find much free stuff yet...
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
---
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
This one, free extension, works. Solves this problem: https://www.opencart.com/index.php?rout ... _license=0
Κατασκευή eshop με Opencart & τεχνική υποστήριξη.
Sorry for my English
For Opencart 3.0.2.0
catalog/controller/mail/order.php
Search
replace by (on all occasions)
Search
Replace by
It worked for me correctly
For Opencart 3.0.2.0
catalog/controller/mail/order.php
Search
Code: Select all
send();
Code: Select all
send();
$this->sameAdminAlert($order_info,$data);
Code: Select all
public function add($order_info, $order_status_id, $comment, $notify)
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
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.
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.
It's very simple. You don't need any modules for do this.
Below I show how to change mail / order_edit (when you notify the customer during an order update), the same applies to the other mail templates.
Follow my steps:
1) Go to catalog/controller/mail/order.php
2) Serach for "$mail->setText($this->load->view('mail/order_edit', $data));"
3) Replace it with "$mail->setHtml($this->load->view('mail/order_edit', $data));"
4) Save and test it
Basicly what we do is that we change mail template format from text to html.
Btw.. It is best practice that you create an ocmod file and run it as a custom modification so you don't overwrite the oc core files.
Below I show how to change mail / order_edit (when you notify the customer during an order update), the same applies to the other mail templates.
Follow my steps:
1) Go to catalog/controller/mail/order.php
2) Serach for "$mail->setText($this->load->view('mail/order_edit', $data));"
3) Replace it with "$mail->setHtml($this->load->view('mail/order_edit', $data));"
4) Save and test it
Basicly what we do is that we change mail template format from text to html.
Btw.. It is best practice that you create an ocmod file and run it as a custom modification so you don't overwrite the oc core files.
Who is online
Users browsing this forum: Semrush [Bot] and 209 guests