Showing posts with label email. Show all posts
Showing posts with label email. Show all posts

Wednesday, February 26, 2014

change opencart order email content as our wish

You can modify the content by editing the following template file:
/catalog/view/theme/default/template/mail/order.tpl
(assuming that you are using the default template)
But if you want to modify the subject and other stuff, you'll need to edit the order Model file:
/catalog/model/checkout/order.php
then find
$mail->setSubject($subject);
and set the $subject to whatever you want :)

sends the same email to the admin as the customer 1.5.x work more like 1.4.x

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();


3. REPLACE WITH:
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();

Removing "Powered By Open Cart" from emails footer



just change to your side easy , no need delete any text .


 

GO to : catalog/language/english/mail/ 



find " open cart , than change to your site name , then done .



OR

find 

$_['text_powered'] 

in

catalog/language/english/common/footer.php

find 

$_['text_new_powered']

in

catalog/language/english/mail/order.php

and change it.

to change the size and font go to

catalog/view/theme/yourtemplate/stylesheet/stylesheet.css

find #powered