//display date on dashproducts && added param date_from & date_to on dashboard hooks
This commit is contained in:
@@ -222,9 +222,14 @@ class AdminDashboardControllerCore extends AdminController
|
|||||||
$calendar_helper->setCompareDateTo($stats_compare_to);
|
$calendar_helper->setCompareDateTo($stats_compare_to);
|
||||||
$calendar_helper->setCompareOption(Tools::getValue('compare_date_option', $this->context->employee->stats_compare_option));
|
$calendar_helper->setCompareOption(Tools::getValue('compare_date_option', $this->context->employee->stats_compare_option));
|
||||||
|
|
||||||
|
$params = array(
|
||||||
|
'date_from' => $this->context->employee->stats_date_from,
|
||||||
|
'date_to' => $this->context->employee->stats_date_to
|
||||||
|
);
|
||||||
|
|
||||||
$this->tpl_view_vars = array(
|
$this->tpl_view_vars = array(
|
||||||
'hookDashboardZoneOne' => Hook::exec('dashboardZoneOne'),
|
'hookDashboardZoneOne' => Hook::exec('dashboardZoneOne', $params),
|
||||||
'hookDashboardZoneTwo' => Hook::exec('dashboardZoneTwo'),
|
'hookDashboardZoneTwo' => Hook::exec('dashboardZoneTwo', $params),
|
||||||
'translations' => $translations,
|
'translations' => $translations,
|
||||||
'action' => '#',
|
'action' => '#',
|
||||||
'warning' => $this->getWarningDomainName(),
|
'warning' => $this->getWarningDomainName(),
|
||||||
|
|||||||
@@ -240,12 +240,20 @@ function toggleDashConfig(widget)
|
|||||||
|
|
||||||
function bindSubmitDashConfig()
|
function bindSubmitDashConfig()
|
||||||
{
|
{
|
||||||
$('.submit_dash_config').on('click', function () {
|
$('.cancel_dash_config').on('click', function () {
|
||||||
saveDashConfig($(this).closest('section.widget').attr('id'));
|
saveDashConfig($(this).closest('section.widget').attr('id'));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function bindCancelDashConfig()
|
||||||
|
{
|
||||||
|
$('.cancel_dash_config').on('click', function () {
|
||||||
|
toggleDashConfig($(this).closest('section.widget').attr('id'));
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function saveDashConfig(widget_name)
|
function saveDashConfig(widget_name)
|
||||||
{
|
{
|
||||||
configs = '';
|
configs = '';
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ class Dashproducts extends Module
|
|||||||
|
|
||||||
public function hookDashboardZoneTwo($params)
|
public function hookDashboardZoneTwo($params)
|
||||||
{
|
{
|
||||||
|
$this->context->smarty->assign(array('date_from' => Tools::displayDate($params['date_from']), 'date_to' => Tools::displayDate($params['date_to'])));
|
||||||
return $this->display(__FILE__, 'dashboard_zone_two.tpl');
|
return $this->display(__FILE__, 'dashboard_zone_two.tpl');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="dash_best_sellers">
|
<div class="tab-pane" id="dash_best_sellers">
|
||||||
<h3>{l s="Top 10 products"}</h3>
|
<h3>{l s="Top 10 products"} - {l s="From:"} {$date_from} {l s="to:"} {$date_to}</h3>
|
||||||
<table class="table data_table" id="table_best_sellers">
|
<table class="table data_table" id="table_best_sellers">
|
||||||
<thead>
|
<thead>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="dash_most_viewed">
|
<div class="tab-pane" id="dash_most_viewed">
|
||||||
<h3>{l s="Coming soon"}</h3>
|
<h3>{l s="Most Viewed"} - {l s="From:"} {$date_from} {l s="to:"} {$date_to}</h3>
|
||||||
<table class="table data_table" id="table_most_viewed">
|
<table class="table data_table" id="table_most_viewed">
|
||||||
<thead>
|
<thead>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -90,28 +90,13 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="dash_top_search">
|
<div class="tab-pane" id="dash_top_search">
|
||||||
<div class="row">
|
<h3>{l s="Top 10 most search terms"} - {l s="From:"} {$date_from} {l s="to:"} {$date_to}</h3>
|
||||||
<div class="col-lg-12">
|
<table class="table data_table" id="table_top_10_most_search">
|
||||||
<h3>{l s="Top 10 most search terms"}</h3>
|
<thead>
|
||||||
<table class="table data_table" id="table_top_10_most_search">
|
</thead>
|
||||||
<thead>
|
<tbody>
|
||||||
</thead>
|
</tbody>
|
||||||
<tbody>
|
</table>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{*
|
|
||||||
<div class="col-lg-5">
|
|
||||||
<h3>{l s="Coming soon"}</h3>
|
|
||||||
<table class="table data_table" id="table_top_5_search">
|
|
||||||
<thead>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
*}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
Reference in New Issue
Block a user