Добрый день!
Наткнулся в сети на любопытную статью по поводу изменения вида email-уведомления.
http://loco.ru/mater...-o-novom-zakaze
Сделал, заменил что нужно.
Покупателю письмо приходит, в красивом виде, все как я и хотел.
Но вот администратору, к сожалению, ничего не приходит.
Не подскажите, как побороть?
Собственно, это
// Admin Alert Mail
if ($this->config->get('config_alert_mail')) {
$subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id);
// Text
$text = $language->get('text_new_received') . "\n\n";
$text .= $language->get('text_new_order_id') . ' ' . $order_id . "\n";
$text .= $language->get('text_new_date_added') . ' ' . date($language->get('date_format_short'), strtotime($order_info['date_added'])) . "\n";
$text .= $language->get('text_new_order_status') . ' ' . $order_status . "\n\n";
$text .= $language->get('text_new_products') . "\n";
foreach ($order_product_query->rows as $product) {
$text .= $product['quantity'] . 'x ' . $product['name'] . ' (' . $product['model'] . ') ' . html_entity_decode($this->currency->format($product['total'] + ($this->config->get('config_tax') ? ($product['tax'] * $product['quantity']) : 0), $order_info['currency_code'], $order_info['currency_value']), ENT_NOQUOTES, 'UTF-8') . "\n";
$order_option_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order_id . "' AND order_product_id = '" . $product['order_product_id'] . "'");
foreach ($order_option_query->rows as $option) {
if ($option['type'] != 'file') {
$value = $option['value'];
} else {
$value = utf8_substr($option['value'], 0, utf8_strrpos($option['value'], '.'));
}
$text .= chr(9) . '-' . $option['name'] . ' ' . (utf8_strlen($value) > 20 ? utf8_substr($value, 0, 20) . '..' : $value) . "\n";
}
}
foreach ($order_voucher_query->rows as $voucher) {
$text .= '1x ' . $voucher['description'] . ' ' . $this->currency->format($voucher['amount'], $order_info['currency_code'], $order_info['currency_value']);
}
$text .= "\n";
$text .= $language->get('text_new_order_total') . "\n";
foreach ($order_total_query->rows as $total) {
$text .= $total['title'] . ': ' . html_entity_decode($total['text'], ENT_NOQUOTES, 'UTF-8') . "\n";
}
$text .= "\n";
if ($order_info['comment']) {
Изменил на это
// Admin Alert Mail
if ($this->config->get('config_alert_mail')) {
$subject = sprintf($language->get('text_new_subject'), html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'), $order_id);
// Text
//$text = $language->get('text_new_received') . "\n\n";
//$text .= $language->get('text_new_order_id') . ' ' . $order_id . "\n";
//$text .= $language->get('text_new_date_added') . ' ' . date($language->get('date_format_short'), strtotime($order_info['date_added'])) . "\n";
//$text .= $language->get('text_new_order_status') . ' ' . $order_status . "\n\n";
// оформление письма админу 1
$text = $language->get('text_new_received') . ' #'.$order_id . ' ('.date($language->get('date_format_short'), strtotime($order_info['date_added'])).')' . "\n";
// $text .= $language->get('text_new_order_id') . ' ' . $order_id . "\n";
// $text .= $language->get('text_new_date_added') . ' ' . date($language->get('date_format_short'), strtotime($order_info['date_added'])) . "\n";
$text .= $language->get('text_new_order_status') . ' ' . strip_tags($order_status) . "\n\n";
if( !empty($order_info['payment_method']) ) $text .= 'payment method: ' . $order_info['payment_method'] . "\n";
// $text .= 'shipping method: ' . $order_info['shipping_method'] . "\n";
if( !empty($order_info['email']) ) $text .= 'email: ' . $order_info['email'] . "\n";
if( !empty($order_info['telephone']) ) $text .= 'telephone: ' . $order_info['telephone'] . ", ";
$text .= 'IP: [url="http://geoiptool.com/en/?IP="]http://geoiptool.com/en/?IP=[/url]' . $order_info['ip'] . "\n\n";
// оформление письма админу 1
$text .= $language->get('text_new_products') . "\n";
foreach ($order_product_query->rows as $result) {
// оформление письма админу 2
//$text .= $result['quantity'] . 'x ' . $result['name'] . ' (' . $result['model'] . ') ' . html_entity_decode($this->currency->format($result['total'], $order_info['currency_code'], $order_info['currency_value']), ENT_NOQUOTES, 'UTF-8') . "\n";
$text .= ' ';
$text .= html_entity_decode($this->currency->format($result['total'], $order_info['currency_code'], $order_info['currency_value']), ENT_NOQUOTES, 'UTF-8');
$text .= ' = ';
$text .= $result['quantity'] . ' x ' . $result['name'] . ' (' . $result['model'] . ")\n";
// оформление письма админу 2
$order_option_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order_id . "' AND order_product_id = '" . $result['order_product_id'] . "'");
foreach ($order_option_query->rows as $option) {
$text .= chr(9) . '-' . $option['name'] . ' ' . utf8_truncate($option['value']) . "\n";
}
}
$text .= "\n";
$text .= $language->get('text_new_order_total') . "\n";
foreach ($order_total_query->rows as $result) {
$text .= ' '; // оформление письма админу 3
$text .= $result['title'] . ' ' . html_entity_decode($result['text'], ENT_NOQUOTES, 'UTF-8') . "\n";
}
$text .= "\n";
if ($order_info['comment'] != '') {
Заранее спасибо!
С уважением!