diff --git a/admin-dev/themes/default/template/controllers/customer_threads/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/customer_threads/helpers/view/view.tpl index dbd310d43..a4931c0b5 100644 --- a/admin-dev/themes/default/template/controllers/customer_threads/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/customer_threads/helpers/view/view.tpl @@ -147,6 +147,7 @@ {/block} diff --git a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl index b14b0b7ed..0d93d010f 100755 --- a/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -90,6 +90,10 @@
{l s='Messages:'}
{sizeof($messages)}
| +
+
{l s='New Customer Messages:'}
+
{sizeof($customer_thread_message)}
+ |
{l s='Products:'}
{sizeof($products)}
diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php index 83740cf38..4b8b8f40e 100644 --- a/controllers/admin/AdminCustomerThreadsController.php +++ b/controllers/admin/AdminCustomerThreadsController.php @@ -653,6 +653,12 @@ class AdminCustomerThreadsControllerCore extends AdminController if (!$this->errors && $value) Configuration::updateValue('PS_SAV_IMAP_OPT', implode('', $value)); } - -} - + + public function ajaxProcessMarkAsRead() + { + $id_thread = Tools::getValue('id_thread'); + $messages = CustomerThread::getMessageCustomerThreads($id_thread); + if (count($messages)) + Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer_message set `read` = 1'); + } +} \ No newline at end of file diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index b1d999443..063accb9c 100755 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -1348,6 +1348,7 @@ class AdminOrdersControllerCore extends AdminController 'orders_total_paid_tax_incl' => $order->getOrdersTotalPaid(), // Get the sum of total_paid_tax_incl of the order with similar reference 'total_paid' => $order->getTotalPaid(), 'returns' => OrderReturn::getOrdersReturn($order->id_customer, $order->id), + 'customer_thread_message' => CustomerThread::getCustomerMessages($order->id_customer, 0), 'orderMessages' => OrderMessage::getOrderMessages($order->id_lang), 'messages' => Message::getMessagesByOrderId($order->id, true), 'carrier' => new Carrier($order->id_carrier),