- 13 Nov 2017, 09:41
#76023
Gostaria de receber o mesmo Email de novo pedido que o cliente recebe com dados do cliente e detalhes do pedido, encontrei esta modificação via VQMOD de uma versão anterior que envia uma cópia do Email de novo pedido do cliente para o administrador. Alguém saberia dizer quais alterações podem ser feitas para funcionar na versão 3x? Ou se existe outra alternativa?
Código: Selecionar todos
<modification>
<id>OCA_Detailed Order Admin Email Notification(1.5.2+)</id>
<version>2.6</version>
<vqmver>2.3.0</vqmver>
<author>Joel - http://opencartaddons.com - webmaster@opencartaddons.com</author>
<file name="catalog/model/checkout/order.php">
<operation>
<search position="before" index="2"><![CDATA[$mail = new Mail();]]></search>
<add><![CDATA[
// HTML Mail
$template->data['text_greeting'] = $language->get('text_new_received') . "\n\n";
if ($comment) {
if ($order_info['comment']) {
$template->data['comment'] = nl2br($comment) . '<br/><br/>' . $order_info['comment'];
} else {
$template->data['comment'] = nl2br($comment);
}
} else {
if ($order_info['comment']) {
$template->data['comment'] = $order_info['comment'];
} else {
$template->data['comment'] = '';
}
}
$template->data['text_download'] = '';
$template->data['text_footer'] = '';
$template->data['text_powered'] = '';
$template->data['text_link'] = '';
$template->data['link'] = '';
$template->data['download'] = '';
$template->data['ip'] = $order_info['ip'] . '<br/><b>' . $language->get('text_new_order_status') . '</b> ' . $order_status;
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');
}
]]></add>
</operation>
<operation>
<search position="before" index="2"><![CDATA[$mail->setText(html_entity_decode($text, ENT_QUOTES, 'UTF-8'));]]></search>
<add><![CDATA[
$mail->setHtml($html);
]]></add>
</operation>
</file>
</modification>