[+] BO : in order tab you have new information of new customer message
This commit is contained in:
@@ -147,6 +147,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var timer;
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('select[name=id_employee_forward]').change(function(){
|
$('select[name=id_employee_forward]').change(function(){
|
||||||
if ($(this).val() >= 0)
|
if ($(this).val() >= 0)
|
||||||
@@ -164,7 +165,27 @@
|
|||||||
$(this).val('');
|
$(this).val('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
timer = setInterval("markAsRead()", 3000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function markAsRead()
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: 'ajax-tab.php',
|
||||||
|
async: true,
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
controller: 'AdminCustomerThreads',
|
||||||
|
action: 'markAsRead',
|
||||||
|
token : '{$token}',
|
||||||
|
id_thread: {$id_customer_thread}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
clearInterval(timer);
|
||||||
|
timer = null;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|||||||
@@ -90,6 +90,10 @@
|
|||||||
<dt>{l s='Messages:'}</dt>
|
<dt>{l s='Messages:'}</dt>
|
||||||
<dd>{sizeof($messages)}</dd>
|
<dd>{sizeof($messages)}</dd>
|
||||||
|</dl>
|
|</dl>
|
||||||
|
<dl>
|
||||||
|
<dt><a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{l s='New Customer Messages:'}</a></dt>
|
||||||
|
<dd><a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}">{sizeof($customer_thread_message)}</a></dd>
|
||||||
|
|</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>{l s='Products:'}</dt>
|
<dt>{l s='Products:'}</dt>
|
||||||
<dd id="product_number">{sizeof($products)}</dd>
|
<dd id="product_number">{sizeof($products)}</dd>
|
||||||
|
|||||||
@@ -653,6 +653,12 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
|||||||
if (!$this->errors && $value)
|
if (!$this->errors && $value)
|
||||||
Configuration::updateValue('PS_SAV_IMAP_OPT', implode('', $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');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
'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(),
|
'total_paid' => $order->getTotalPaid(),
|
||||||
'returns' => OrderReturn::getOrdersReturn($order->id_customer, $order->id),
|
'returns' => OrderReturn::getOrdersReturn($order->id_customer, $order->id),
|
||||||
|
'customer_thread_message' => CustomerThread::getCustomerMessages($order->id_customer, 0),
|
||||||
'orderMessages' => OrderMessage::getOrderMessages($order->id_lang),
|
'orderMessages' => OrderMessage::getOrderMessages($order->id_lang),
|
||||||
'messages' => Message::getMessagesByOrderId($order->id, true),
|
'messages' => Message::getMessagesByOrderId($order->id, true),
|
||||||
'carrier' => new Carrier($order->id_carrier),
|
'carrier' => new Carrier($order->id_carrier),
|
||||||
|
|||||||
Reference in New Issue
Block a user