// fix notifications in smarty BO
This commit is contained in:
@@ -34,6 +34,18 @@
|
|||||||
var helpboxes = {$help_box};
|
var helpboxes = {$help_box};
|
||||||
var roundMode = {$round_mode};
|
var roundMode = {$round_mode};
|
||||||
|
|
||||||
|
{if isset($shop_context)}
|
||||||
|
{if $shop_context == 'all'}
|
||||||
|
var youEditFieldFor = {l s='A modification of this field will be applied for all shops'}
|
||||||
|
{elseif $shop_context == 'group'}
|
||||||
|
var youEditFieldFor = {l s='A modification of this field will be applied for all shops of group '}<b>{$shop_name}</b>
|
||||||
|
{else}
|
||||||
|
var youEditFieldFor = {l s='A modification of this field will be applied for the shop '}<b>{$shop_name}</b>
|
||||||
|
{/if}
|
||||||
|
{else}
|
||||||
|
var youEditFieldFor = '';
|
||||||
|
{/if}
|
||||||
|
|
||||||
{* Notifications vars *}
|
{* Notifications vars *}
|
||||||
var new_order_msg = '{l s='A new order has been made on your shop.'}';
|
var new_order_msg = '{l s='A new order has been made on your shop.'}';
|
||||||
var order_number_msg = '{l s='Order number : '}';
|
var order_number_msg = '{l s='Order number : '}';
|
||||||
@@ -46,6 +58,8 @@
|
|||||||
var new_msg = '{l s='A new message posted on your shop.'}';
|
var new_msg = '{l s='A new message posted on your shop.'}';
|
||||||
var excerpt_msg = '{l s='Excerpt : '}';
|
var excerpt_msg = '{l s='Excerpt : '}';
|
||||||
var see_msg = '{l s='Click here to see that message'}';
|
var see_msg = '{l s='Click here to see that message'}';
|
||||||
|
var token_admin_orders = '{$token_admin_orders}';
|
||||||
|
var token_admin_customers = '{$token_admin_customers}';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{if isset($css_files)}
|
{if isset($css_files)}
|
||||||
@@ -85,18 +99,6 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body {if $bo_color} style="background:{$bo_color}" {/if}>
|
<body {if $bo_color} style="background:{$bo_color}" {/if}>
|
||||||
{if $is_multishop}
|
|
||||||
<script type="text/javascript">
|
|
||||||
hints.html(hints.html()+\'<br /><span class="red">'.addslashes(
|
|
||||||
{if $shop_context == 'all'}
|
|
||||||
{l s='A modification of this field will be applied for all shops'}
|
|
||||||
{elseif $shop_context == 'group'}{l s=''}
|
|
||||||
{l s='A modification of this field will be applied for all shops of group '}<b>{$shop_name}</b>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
).'</span>\');
|
|
||||||
</script>
|
|
||||||
{/if}
|
|
||||||
<div id="top_container">
|
<div id="top_container">
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="header_infos"><span>
|
<div id="header_infos"><span>
|
||||||
@@ -136,7 +138,7 @@
|
|||||||
<h3>{l s='Last messages'}</h3>
|
<h3>{l s='Last messages'}</h3>
|
||||||
<p class="no_notifs">{l s='No new messages posted on your shop'}</p>
|
<p class="no_notifs">{l s='No new messages posted on your shop'}</p>
|
||||||
<ul id="list_messages_notif"></ul>
|
<ul id="list_messages_notif"></ul>
|
||||||
<p><a href="index.php?tab=AdminMessages&token='.Tools::getAdminTokenLite('AdminMessages').'">{l s='Show all messages'}</a></p>
|
<p><a href="index.php?tab=AdminMessages&token={$token_admin_messages}">{l s='Show all messages'}</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -239,6 +239,7 @@ class AdminController extends Controller
|
|||||||
'show_new_messages' => Configuration::get('PS_SHOW_NEW_MESSAGES'),
|
'show_new_messages' => Configuration::get('PS_SHOW_NEW_MESSAGES'),
|
||||||
'token_admin_orders' => Tools::getAdminTokenLite('AdminOrders'),
|
'token_admin_orders' => Tools::getAdminTokenLite('AdminOrders'),
|
||||||
'token_admin_customers' => Tools::getAdminTokenLite('AdminCustomers'),
|
'token_admin_customers' => Tools::getAdminTokenLite('AdminCustomers'),
|
||||||
|
'token_admin_messages' => Tools::getAdminTokenLite('AdminMessages'),
|
||||||
'token_admin_employees' => Tools::getAdminTokenLite('AdminEmployees'),
|
'token_admin_employees' => Tools::getAdminTokenLite('AdminEmployees'),
|
||||||
'token_admin_search' => Tools::getAdminTokenLite('AdminSearch'),
|
'token_admin_search' => Tools::getAdminTokenLite('AdminSearch'),
|
||||||
'first_name' => Tools::substr($this->context->employee->firstname, 0, 1),
|
'first_name' => Tools::substr($this->context->employee->firstname, 0, 1),
|
||||||
|
|||||||
+2
-2
@@ -9,7 +9,7 @@ function getPush()
|
|||||||
html = "";
|
html = "";
|
||||||
nb_notifs = 0;
|
nb_notifs = 0;
|
||||||
$.each(json.order, function(property, value) {
|
$.each(json.order, function(property, value) {
|
||||||
html += "<li>" + new_order_msg + "<br />" + order_number_msg + "<strong>#" + parseInt(value.id_order) + "</strong><br />" + total_msg + "<strong>" + value.total_paid_real + "</strong><br />" + from_msg + "<strong>" + value.customer_name + "</strong><br /><a href=\"index.php?tab=AdminOrders&token='.Tools::getAdminTokenLite('AdminOrders').'&vieworder&id_order=" + parseInt(value.id_order) + "\">" + see_order_msg + "</a></li>";
|
html += "<li>" + new_order_msg + "<br />" + order_number_msg + "<strong>#" + parseInt(value.id_order) + "</strong><br />" + total_msg + "<strong>" + value.total_paid_real + "</strong><br />" + from_msg + "<strong>" + value.customer_name + "</strong><br /><a href=\"index.php?tab=AdminOrders&token=" + token_admin_orders + "&vieworder&id_order=" + parseInt(value.id_order) + "\">" + see_order_msg + "</a></li>";
|
||||||
});
|
});
|
||||||
if (html != "")
|
if (html != "")
|
||||||
{
|
{
|
||||||
@@ -28,7 +28,7 @@ function getPush()
|
|||||||
html = "";
|
html = "";
|
||||||
nb_notifs = 0;
|
nb_notifs = 0;
|
||||||
$.each(json.customer, function(property, value) {
|
$.each(json.customer, function(property, value) {
|
||||||
html += "<li>" + new_customer_msg + "<br />" + customer_name_msg + "<strong>" + value.customer_name + "</strong><br /><a href=\"index.php?tab=AdminCustomers&token='.Tools::getAdminTokenLite('AdminCustomers').'&viewcustomer&id_customer=" + parseInt(value.id_customer) + "\">" + see_customer_msg + "</a></li>";
|
html += "<li>" + new_customer_msg + "<br />" + customer_name_msg + "<strong>" + value.customer_name + "</strong><br /><a href=\"index.php?tab=AdminCustomers&token=" + token_admin_customers + "&viewcustomer&id_customer=" + parseInt(value.id_customer) + "\">" + see_customer_msg + "</a></li>";
|
||||||
});
|
});
|
||||||
if (html != "")
|
if (html != "")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user