Includes
- - Customer Registers HTML Email
- Order Email to Customer and Admin
- Update Order notify Customer
- Newsletter HTML layout/background
Advanced Professional Email Template
Customers Pre-Sale. Inc abandoned cart email
Order Follow-Up Email. Inc request review
Email Validation with ZeroBounce
Do the following....
(1.5.x ONLY!)
1. EDIT: catalog/model/checkout/order.php
2. FIND (~LINES 475 - 488) (Be sure its under the "// Admin Alert Mail" line)
Code: Select all
$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->hostname = $this->config->get('config_smtp_host');
$mail->username = $this->config->get('config_smtp_username');
$mail->password = $this->config->get('config_smtp_password');
$mail->port = $this->config->get('config_smtp_port');
$mail->timeout = $this->config->get('config_smtp_timeout');
$mail->setTo($this->config->get('config_email'));
$mail->setFrom($this->config->get('config_email'));
$mail->setSender($order_info['store_name']);
$mail->setSubject($subject);
$mail->setText($text);
$mail->send();
Code: Select all
// HTML
$template->data['text_greeting'] = $language->get('text_new_received') . "\n\n";
$template->data['invoice_no'] = '';
$template->data['text_invoice_no'] = '';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/mail/order.tpl')) {
$html = $template->fetch($this->config->get('config_template') . '/template/mail/order.tpl');
} else {
$html = $template->fetch('default/template/mail/order.tpl');
}
$subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id . ' (' . $order_total . ')');
$mail->setSubject($subject);
$mail->setTo($this->config->get('config_email'));
$mail->setHtml($html);
$mail->send();
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Spent ages figuring it out - Im not a programmer so please backup your files if you use this method.
I have attached the 2 files that have been changed
1) catalog/model/checkout/order.php
2) catalog/view/theme/default/template/mail/order.tpl
this will add the comments to your admin order email and the customers order email.
The fix above by qphoria is included in the catalog/model/checkout/order.php.
so by overwriting the files, no further action needs to be taken.
Ronnie
Attachments
Thanks
Peter Sesselmann
Acoustic Stompboxes and Guitar Pickups, Art
http://www.peterman.com.au
ronnieb wrote:OK
Spent ages figuring it out - Im not a programmer so please backup your files if you use this method.
I have attached the 2 files that have been changed
1) catalog/model/checkout/order.php
2) catalog/view/theme/default/template/mail/order.tpl
this will add the comments to your admin order email and the customers order email.
The fix above by qphoria is included in the catalog/model/checkout/order.php.
so by overwriting the files, no further action needs to be taken.
Ronnie
Thanks so much Ronnie!! You saved me from my "harassing" client who can't understand why I can't fix it

Yes, It works but then the email title is:Qphoria wrote:For the 1.4.x version that sends the same email to the admin as the customer.
(1.5.x ONLY!)
1. EDIT: catalog/model/checkout/order.php
2. FIND (~LINES 475 - 488) (Be sure its under the "// Admin Alert Mail" line)3. REPLACE WITH:Code: Select all
$mail = new Mail(); $mail->protocol = $this->config->get('config_mail_protocol'); $mail->parameter = $this->config->get('config_mail_parameter'); $mail->hostname = $this->config->get('config_smtp_host'); $mail->username = $this->config->get('config_smtp_username'); $mail->password = $this->config->get('config_smtp_password'); $mail->port = $this->config->get('config_smtp_port'); $mail->timeout = $this->config->get('config_smtp_timeout'); $mail->setTo($this->config->get('config_email')); $mail->setFrom($this->config->get('config_email')); $mail->setSender($order_info['store_name']); $mail->setSubject($subject); $mail->setText($text); $mail->send();
Code: Select all
// HTML $template->data['text_greeting'] = $language->get('text_new_received') . "\n\n"; $template->data['invoice_no'] = ''; $template->data['text_invoice_no'] = ''; if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/mail/order.tpl')) { $html = $template->fetch($this->config->get('config_template') . '/template/mail/order.tpl'); } else { $html = $template->fetch('default/template/mail/order.tpl'); } $subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id . ' (' . $order_total . ')'); $mail->setSubject($subject); $mail->setTo($this->config->get('config_email')); $mail->setHtml($html); $mail->send();
SHOP NAME - Order XX (Array)
How do I remove that (Array) in the email tittle since it does not make any sense?

Please try my Free and real time web translator made with Google API. and let me know what ya think
Live long my friends
visit our website now at http://www.less2websites.com
OC version 1.5.1.3
Cheers
Live long my friends
visit our website now at http://www.less2websites.com
This should work and change the subject to "Ben Smith, thank you for your order(ID:11) with Your Store"aide2001 wrote:Yes that works too, but I still would like the customers name in the subject line instead of the total order, or maybe both name and total. The name is more important to me than the total order, anyone got any ideas on the php scripting of mod catalog/model/checkout/order.php
Cheers
FILE: catalog/language/english/mail/order.php
FIND:
$_['text_new_subject'] = '%s - Order %s';
REPLACE:
$_['text_new_subject'] = '%s thank you for your order(ID:%s) with %s';
Code: Select all
<operation>
<search position="after"><![CDATA[
$subject = sprintf($language->get('text_new_subject'), $order_info['store_name'], $order_id);
]]></search>
<add><![CDATA[
// Load customer
$this->load->model('account/customer');
$customer = $this->module_account_customer->getCustomer($order_info['customer_id']);
// Merge first and last name
$full_name = $customer['firstname'] . ' ' . $customer['lastname'];
$subject = sprintf($language->get('text_new_subject'), $full_name, $order_id, $order_info['store_name']);
]]></add>
</operation>
Advanced Professional Email Template
Customers Pre-Sale. Inc abandoned cart email
Order Follow-Up Email. Inc request review
Email Validation with ZeroBounce
$subject = sprintf($language->get('text_new_subject'), $order_info['store_name'], $order_id);
and replace with all the other php script??
Okay tried both ways, and no email admin comes through, so put back to normal for now and to see if anyone else can come up with the script
Live long my friends
visit our website now at http://www.less2websites.com
I am having this same problem, the HTML email confirmation is working great apart from the fact that '(Array)' is being added to the end of the subject line. Is there any way to change this?Yes, It works but then the email title is:
SHOP NAME - Order XX (Array)
How do I remove that (Array) in the email tittle since it does not make any sense?
Gym Equipment Online Store
http://www.wizardhomefitness.com.au
----------------------------------------------------
Fresh Kicks Online Sneaker & Clothing Store
http://www.freshkicks.com.au
Users browsing this forum: No registered users and 7 guests