diff --git a/admin/themes/default/sass/partials/_commons.sass b/admin/themes/default/sass/partials/_commons.sass
index d48b32d5d..588ef7d53 100644
--- a/admin/themes/default/sass/partials/_commons.sass
+++ b/admin/themes/default/sass/partials/_commons.sass
@@ -206,4 +206,13 @@
cursor: pointer
#recommendation-wrapper
- margin-bottom: 20px
\ No newline at end of file
+ margin-bottom: 20px
+
+//list column selection
+#optional-list-toggle
+ font-family: "Open Sans",Helvetica,Arial,sans-serif
+ font-size: 13px
+ padding: 8px 12px
+ text-transform: none
+ label
+ font-weight: 400
\ No newline at end of file
diff --git a/admin/themes/default/sass/partials/_content.sass b/admin/themes/default/sass/partials/_content.sass
index c1d359e26..2a765f62e 100644
--- a/admin/themes/default/sass/partials/_content.sass
+++ b/admin/themes/default/sass/partials/_content.sass
@@ -106,6 +106,8 @@ body
text-align: center
font-size: 18px
line-height: 30px
+ .dropdown-menu
+ line-height: normal
.panel-danger .panel-heading
background-color: $badge-notif-color!important
form .alert
diff --git a/admin/themes/default/sass/partials/_tables.sass b/admin/themes/default/sass/partials/_tables.sass
index 377e1eef5..7382ff13a 100644
--- a/admin/themes/default/sass/partials/_tables.sass
+++ b/admin/themes/default/sass/partials/_tables.sass
@@ -148,6 +148,8 @@ tr.highlighted td
.date_range .input-group:first-child
margin-bottom: 5px
+.input_range > :first-child
+ margin-bottom: 5px
@media (max-width: $screen-sm-max)
.table-responsive-row
diff --git a/admin/themes/default/template/controllers/orders/helpers/list/list_header.tpl b/admin/themes/default/template/controllers/orders/helpers/list/list_header.tpl
index 0129f4cbd..9224d8ae1 100644
--- a/admin/themes/default/template/controllers/orders/helpers/list/list_header.tpl
+++ b/admin/themes/default/template/controllers/orders/helpers/list/list_header.tpl
@@ -65,3 +65,271 @@
{/if}
{/block}
+
+
+{block name="tableFilter"}{/block}
+{block name="override_form_extra"}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {if $filters_has_value}
+
+ {l s='Filters: '}
+
+ {foreach $fields_display AS $key => $params}
+ {if (!isset($params.search) || $params.search) && $params.value != ''}
+ {if ($params.type == 'date' || $params.type == 'datetime' || $params.type == 'range') && $params.value|is_array}
+ {assign var="filter_value" value=''}
+ {foreach $params.value as $value}
+ {if ($value|is_string && !empty($value))}
+ {if empty($filter_value)}
+ {assign var="filter_value" value=$value}
+ {else}
+ {assign var="filter_value" value="`$filter_value` - `$value`"}
+ {/if}
+ {/if}
+ {/foreach}
+ {if !empty($filter_value)}
+
+ {$params['title']|escape:'html':'UTF-8'}: {$filter_value|escape:'html':'UTF-8'}
+
+
+ {/if}
+ {else if $params.type == 'select'}
+
+ {$params['title']|escape:'html':'UTF-8'}: {$params['list'][$params['value']]|escape:'html':'UTF-8'}
+
+
+ {else}
+
+ {$params['title']|escape:'html':'UTF-8'}: {$params['value']|escape:'html':'UTF-8'}
+
+
+ {/if}
+ {/if}
+ {/foreach}
+
+
+ {/if}
+
+ {if !$simple_header && $show_filters}
+
+
+
+ {foreach $fields_display AS $key => $params}
+ {if !isset($params.search) || $params.search}
+
+
+
+
+ {/if}
+ {/foreach}
+ {if $has_actions || $show_filters}
+
+
+ {if $show_filters}
+
+
+ {if $filters_has_value}
+
+ {/if}
+
+ {/if}
+
+ {/if}
+
+
+
+ {/if}
+
+
+
+
+
+
+{/block}
+
+
diff --git a/admin/themes/default/template/helpers/list/list_content.tpl b/admin/themes/default/template/helpers/list/list_content.tpl
index 050072c95..169041dc6 100644
--- a/admin/themes/default/template/helpers/list/list_content.tpl
+++ b/admin/themes/default/template/helpers/list/list_content.tpl
@@ -39,6 +39,7 @@
{/if}
{foreach $fields_display AS $key => $params}
+ {if isset($params.displayed) && $params.displayed === false}{continue}{/if}
{block name="open_td"}
+ onclick="document.location = '{$current_index|escape:'html':'UTF-8'}&{$identifier|escape:'html':'UTF-8'}={$tr.$identifier|escape:'html':'UTF-8'}{if $view}&view{else}&update{/if}{$table|escape:'html':'UTF-8'}{if $page > 1}&page={$page|intval}{/if}&token={$token|escape:'html':'UTF-8'}'"
{else}
- >
- {/if}
+ {/if}
+ data-key="{$key}"
+ >
{/block}
{block name="td_content"}
{if isset($params.prefix)}{$params.prefix}{/if}
diff --git a/admin/themes/default/template/helpers/list/list_header.tpl b/admin/themes/default/template/helpers/list/list_header.tpl
index 82a11864c..b9e761136 100644
--- a/admin/themes/default/template/helpers/list/list_header.tpl
+++ b/admin/themes/default/template/helpers/list/list_header.tpl
@@ -121,45 +121,105 @@
{block name="override_form_extra"}{/block}
-
-
- {if isset($icon)} {/if}{if is_array($title)}{$title|end}{else}{$title}{/if}
- {if isset($toolbar_btn) && count($toolbar_btn) >0}
- {$list_total}
-
- {foreach from=$toolbar_btn item=btn key=k}
- {if $k != 'modules-list' && $k != 'back'}
-
-
-
-
-
- {/if}
- {/foreach}
-
-
-
-
-
- {if isset($sql) && $sql}
- {assign var=sql_manager value=Profile::getProfileAccess(Context::getContext()->employee->id_profile, Tab::getIdFromClassName('AdminRequestSql'))}
+
+ {block name="panel_heading"}
+
+ {if isset($icon)} {/if}{if is_array($title)}{$title|end}{else}{$title}{/if}
+ {if isset($toolbar_btn) && count($toolbar_btn) >0}
+ {$list_total}
+ {block name="panel_heading_action"}
+
+ {foreach from=$toolbar_btn item=btn key=k}
+ {if $k != 'modules-list' && $k != 'back'}
+
+
+
+
+
+ {/if}
+ {/foreach}
+ {if $fields_optional|count}
+
+
+
+
+
+ {/if}
+
+
+
+
+
+
+ {if isset($sql) && $sql}
+ {assign var=sql_manager value=Profile::getProfileAccess(Context::getContext()->employee->id_profile, Tab::getIdFromClassName('AdminRequestSql'))}
+
+ {if $sql_manager.view == 1}
+
+
+
+
+
+
+
+
+
+
+ {/if}
+ {/if}
+
+ {/block}
{/if}
-
- {/if}
-
+
+ {/block}
{if $show_toolbar}
-
- {elseif $params.type == 'select'}
- {if isset($params.filter_key)}
-
- {/if}
+
+ {/if}
+ {* Filters (input, select, date or bool) *}
+ {foreach $fields_display AS $key => $params}
+ {if isset($params.displayed) && $params.displayed === false}{continue}{/if}
+
+ {if isset($params.search) && !$params.search}
+ --
{else}
-
+ {if $params.type == 'range'}
+
+
+
+
+ {else if $params.type == 'bool'}
+
+ {elseif $params.type == 'date' || $params.type == 'datetime'}
+
+ {elseif $params.type == 'select'}
+ {if isset($params.filter_key)}
+
+ {/if}
+ {else}
+
+ {/if}
{/if}
- {/if}
- |
- {/foreach}
+
+ {/foreach}
- {if $shop_link_type}
- -- |
- {/if}
- {if $has_actions || $show_filters}
-
- {if $show_filters}
-
- {*Search must be before reset for default form submit*}
-
- {if $filters_has_value}
- |
+ {/if}
+
+ {/if}
+ {/block}
diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php
index 223fbb009..e59362528 100644
--- a/classes/controller/AdminController.php
+++ b/classes/controller/AdminController.php
@@ -709,6 +709,18 @@ class AdminControllerCore extends Controller
$filter_value .= ' - '.$date[1];
}
}
+ } elseif (isset($t['type']) && $t['type'] == 'range') {
+ $range = json_decode($val, true);
+ if (isset($range[0]) && !empty($range[0])) {
+ $filter_value = $range[0];
+ if (isset($range[1]) && !empty($range[1])) {
+ $filter_value .= ' - '.$range[1];
+ }
+ } else {
+ if (isset($range[1]) && !empty($range[1])) {
+ $filter_value = $range[1];
+ }
+ }
} elseif (is_string($val)) {
$filter_value = htmlspecialchars($val, ENT_QUOTES, 'UTF-8');
}
@@ -856,7 +868,7 @@ class AdminControllerCore extends Controller
if ($field = $this->filterToField($key, $filter)) {
$type = (array_key_exists('filter_type', $field) ? $field['filter_type'] : (array_key_exists('type', $field) ? $field['type'] : false));
- if (($type == 'date' || $type == 'datetime') && is_string($value)) {
+ if (($type == 'date' || $type == 'datetime' || $type == 'range') && is_string($value)) {
$value = json_decode($value, true);
}
$key = isset($tmp_tab[1]) ? $tmp_tab[0].'.`'.$tmp_tab[1].'`' : '`'.$tmp_tab[0].'`';
@@ -874,22 +886,34 @@ class AdminControllerCore extends Controller
} else {
$sql_filter = & $this->_filter;
}
-
/* Only for date filtering (from, to) */
if (is_array($value)) {
- if (isset($value[0]) && !empty($value[0])) {
- if (!Validate::isDate($value[0])) {
- $this->errors[] = Tools::displayError('The \'From\' date format is invalid (YYYY-MM-DD)');
- } else {
- $sql_filter .= ' AND '.pSQL($key).' >= \''.pSQL(Tools::dateFrom($value[0])).'\'';
+ if ($type == 'range') {
+ if (isset($value[0]) && !empty($value[0])) {
+ if (!Validate::isUnsignedInt($value[0])) {
+ $this->errors[] = Tools::displayError('The \'From\' value is invalid');
+ } else {
+ $sql_filter .= ' AND '.pSQL($key).' >= '.pSQL($value[0]);
+ }
+ }
+ if (isset($value[1]) && !empty($value[1])) {
+ $sql_filter .= ' AND '.pSQL($key).' <= '.pSQL($value[1]);
+ }
+ } else {
+ if (isset($value[0]) && !empty($value[0])) {
+ if (!Validate::isDate($value[0])) {
+ $this->errors[] = Tools::displayError('The \'From\' date format is invalid (YYYY-MM-DD)');
+ } else {
+ $sql_filter .= ' AND '.pSQL($key).' >= \''.pSQL(Tools::dateFrom($value[0])).'\'';
+ }
}
- }
- if (isset($value[1]) && !empty($value[1])) {
- if (!Validate::isDate($value[1])) {
- $this->errors[] = Tools::displayError('The \'To\' date format is invalid (YYYY-MM-DD)');
- } else {
- $sql_filter .= ' AND '.pSQL($key).' <= \''.pSQL(Tools::dateTo($value[1])).'\'';
+ if (isset($value[1]) && !empty($value[1])) {
+ if (!Validate::isDate($value[1])) {
+ $this->errors[] = Tools::displayError('The \'To\' date format is invalid (YYYY-MM-DD)');
+ } else {
+ $sql_filter .= ' AND '.pSQL($key).' <= \''.pSQL(Tools::dateTo($value[1])).'\'';
+ }
}
}
} else {
@@ -915,6 +939,15 @@ class AdminControllerCore extends Controller
}
}
+ public function processListVisibility()
+ {
+ $listFieldsVisibility = Tools::getValue('list_fields_visibility');
+ $controller = 'list_visibility_'.$this->context->controller->className;
+ $this->context->cookie->$controller = json_encode($listFieldsVisibility);
+
+ return true;
+ }
+
/**
* @TODO uses redirectAdmin only if !$this->ajax
* @return bool
@@ -3923,6 +3956,22 @@ class AdminControllerCore extends Controller
$this->ajaxDie(json_encode($response));
}
+ /**
+ * Save list visible columns
+ *
+ * @return json as response
+ */
+ public function ajaxProcessUpdateListVisivility()
+ {
+ $response = array(
+ 'success' => false
+ );
+
+ $response['success'] = $this->processListVisibility();
+
+ $this->ajaxDie(json_encode($response));
+ }
+
/**
* Enable multiple items
*
diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php
index 5149d69fb..d1a9e1946 100644
--- a/classes/helper/HelperList.php
+++ b/classes/helper/HelperList.php
@@ -81,6 +81,8 @@ class HelperListCore extends Helper
*/
protected $fields_list;
+ protected $fields_optional = array();
+
/** @var bool Content line is clickable if true */
public $no_link = false;
@@ -333,6 +335,12 @@ class HelperListCore extends Helper
}
}
+ foreach ($this->fields_list as $key => $params) {
+ if (isset($field['optional']) && $field['optional']) {
+ $this->fields_optional[$key] = $field;
+ }
+ }
+
$this->content_tpl->assign(array_merge($this->tpl_vars, array(
'shop_link_type' => $this->shopLinkType,
'name' => isset($name) ? $name : null,
@@ -348,6 +356,7 @@ class HelperListCore extends Helper
'order_way' => $this->orderWay,
'is_cms' => $this->is_cms,
'fields_display' => $this->fields_list,
+ 'fields_optional' => $this->fields_optional,
'list' => $this->_list,
'actions' => $this->actions,
'no_link' => $this->no_link,
@@ -635,6 +644,12 @@ class HelperListCore extends Helper
$this->context->controller->addJqueryUI('ui.datepicker');
break;
+ case 'range':
+ if (is_string($value)) {
+ $value = json_decode($value, true);
+ }
+ break;
+
case 'select':
foreach ($params['list'] as $option_value => $option_display) {
if (isset(Context::getContext()->cookie->{$prefix.$this->list_id.'Filter_'.$params['filter_key']})
@@ -667,9 +682,22 @@ class HelperListCore extends Helper
$has_value = true;
break;
}
+ }
+
+ // get selected fields to display
+ $list_visibility = json_decode($this->context->cookie->{'list_visibility_'.$this->context->controller->className});
+ foreach ($this->fields_list as $key => $field) {
if (!(isset($field['search']) && $field['search'] === false)) {
$has_search_field = true;
}
+ if (isset($field['optional']) && $field['optional']) {
+ $this->fields_optional[$key] = $field;
+ if ((empty($list_visibility) && isset($field['visible_default']) && $field['visible_default'])
+ || $list_visibility && in_array($key , $list_visibility)
+ ) {
+ $this->fields_optional[$key]['selected'] = true;
+ }
+ }
}
Context::getContext()->smarty->assign(array(
@@ -699,6 +727,7 @@ class HelperListCore extends Helper
'order_way' => $this->orderWay,
'order_by' => $this->orderBy,
'fields_display' => $this->fields_list,
+ 'fields_optional' => $this->fields_optional,
'delete' => in_array('delete', $this->actions),
'identifier' => $this->identifier,
'id_cat' => $id_cat,
diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php
index 2f2acea90..6903ec301 100644
--- a/controllers/admin/AdminOrdersController.php
+++ b/controllers/admin/AdminOrdersController.php
@@ -63,46 +63,108 @@ class AdminOrdersControllerCore extends AdminController
CONCAT(c.`firstname`, \' \', c.`lastname`) AS `customer`,
osl.`name` AS `osname`, os.`color`,
IF((SELECT so.id_order FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer AND so.id_order < a.id_order LIMIT 1) > 0, 0, 1) as new,
- IF(a.valid, 1, 0) badge_success';
+ IF(a.valid, 1, 0) badge_success,
+ hbil.`hotel_name`, COUNT(hbd.`id`) as `num_rooms`, SUM(hbd.`adults`) + SUM(hbd.`children`) as `total_guests`,
+ CONCAT(
+ SUM(hbd.`adults`),
+ \' '.$this->l('Adult(s)').' \',
+ IF(SUM(hbd.`children`), CONCAT(SUM(hbd.`children`), \' '.$this->l('Children').'\'), \'\')
+ ) as `guest_text`,
+ SUM(DATEDIFF(hbd.`date_to`, hbd.`date_from`)) as los,
+ GROUP_CONCAT(hbd.`date_from`) as `all_date_from`, GROUP_CONCAT(hbd.`date_to`) as `all_date_to`,
+ GROUP_CONCAT(hbd.`room_type_name`) as `all_room_types`';
$this->_join = '
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`)
LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = a.`current_state`)
- LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int) $this->context->language->id.')';
+ LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int) $this->context->language->id.')
+ LEFT JOIN `'._DB_PREFIX_.'htl_booking_detail` hbd ON (hbd.`id_order` = a.`id_order`)
+ LEFT JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hbil ON (hbil.`id` = hbd.`id_hotel`)';
+
$this->_orderBy = 'id_order';
$this->_orderWay = 'DESC';
$this->_use_found_rows = true;
+ $this->_group = ' GROUP BY hbd.`id_order`';
+
$statuses = OrderState::getOrderStates((int)$this->context->language->id);
foreach ($statuses as $status) {
$this->statuses_array[$status['id_order_state']] = $status['name'];
}
+ $all_order_sources = Db::getInstance()->executeS('SELECT DISTINCT(`source`) FROM `'._DB_PREFIX_.'orders`');
+ foreach ($all_order_sources as $source) {
+ $this->all_order_sources[$source['source']] = $source['source'];
+ }
$this->fields_list = array(
'id_order' => array(
'title' => $this->l('ID'),
'align' => 'text-center',
- 'class' => 'fixed-width-xs'
+ 'class' => 'fixed-width-xs',
),
'reference' => array(
'title' => $this->l('Reference')
),
- 'new' => array(
- 'title' => $this->l('New client'),
- 'align' => 'text-center',
- 'type' => 'bool',
- 'tmpTableFilter' => true,
- 'orderby' => false,
- 'callback' => 'printNewCustomer'
- ),
'customer' => array(
'title' => $this->l('Customer'),
'havingFilter' => true,
+ 'optional' => true,
+ 'visible_default' => true
),
'order_source' => array(
'title' => $this->l('Order Source'),
+ 'type' => 'select',
+ 'filter_key' => 'a!source',
+ 'list' => $this->all_order_sources,
+ 'optional' => true,
+ 'visible_default' => true
+ ),
+ 'hotel_name' => array(
+ 'title' => $this->l('Hotel'),
+ 'filter_key' => 'hbil!hotel_name',
+ 'optional' => true,
+ 'visible_default' => true
+ ),
+ 'all_date_from' => array(
+ 'title' => $this->l('Check-in'),
+ 'filter_key' => 'hbd!date_from',
+ 'type'=>'date',
+ 'displayed' => false,
+ ),
+ 'all_date_to' => array(
+ 'title' => $this->l('Check-out'),
+ 'filter_key' => 'hbd!date_to',
+ 'type'=>'date',
+ 'displayed' => false,
+ ),
+ 'all_room_types' => array(
+ 'title' => $this->l('Room type'),
+ 'filter_key' => 'hbd!room_type_name',
+ 'type'=>'text',
+ 'displayed' => false,
+ ),
+ 'guest_text' => array(
+ 'title' => $this->l('Guests'),
+ 'type' => 'range',
+ 'filter_key' => 'total_guests',
+ 'optional' => true,
'havingFilter' => true,
),
+ 'num_rooms' => array(
+ 'title' => $this->l('No. of rooms'),
+ 'align' => 'text-center',
+ 'type' => 'range',
+ 'optional' => true,
+ 'havingFilter' => true,
+ 'visible_default' => true
+ ),
+ 'los' => array(
+ 'title' => $this->l('Stay period'),
+ 'align' => 'text-center',
+ 'type' => 'range',
+ 'havingFilter' => true,
+ 'optional' => true,
+ ),
);
if (Configuration::get('PS_B2B_ENABLE')) {
@@ -131,6 +193,8 @@ class AdminOrdersControllerCore extends AdminController
'havingFilter' => true,
'callback' => 'setOrderCurrency',
'badge_success' => true,
+ 'optional' => true,
+ 'visible_default' => true
),
'payment' => array(
'title' => $this->l('Payment')
@@ -142,13 +206,17 @@ class AdminOrdersControllerCore extends AdminController
'list' => $this->statuses_array,
'filter_key' => 'os!id_order_state',
'filter_type' => 'int',
- 'order_key' => 'osname'
+ 'order_key' => 'osname',
+ 'optional' => true,
+ 'visible_default' => true
),
'date_add' => array(
- 'title' => $this->l('Date'),
+ 'title' => $this->l('Order date'),
'align' => 'text-right',
'type' => 'datetime',
- 'filter_key' => 'a!date_add'
+ 'filter_key' => 'a!date_add',
+ 'optional' => true,
+ 'visible_default' => true
),
'id_pdf' => array(
'title' => $this->l('PDF'),
@@ -156,7 +224,8 @@ class AdminOrdersControllerCore extends AdminController
'callback' => 'printPDFIcons',
'orderby' => false,
'search' => false,
- 'remove_onclick' => true
+ 'remove_onclick' => true,
+ 'optional' => true,
)
));
@@ -1287,56 +1356,56 @@ class AdminOrdersControllerCore extends AdminController
parent::postProcess();
}
- public function renderKpis()
- {
- $time = time();
- $kpis = array();
+ // public function renderKpis()
+ // {
+ // $time = time();
+ // $kpis = array();
- $helper = new HelperKpi();
- $helper->id = 'box-conversion-rate';
- $helper->icon = 'icon-sort-by-attributes-alt';
- //$helper->chart = true;
- $helper->color = 'color1';
- $helper->title = $this->l('Conversion Rate', null, null, false);
- $helper->subtitle = $this->l('30 days', null, null, false);
- if (ConfigurationKPI::get('CONVERSION_RATE_CHART') !== false) {
- $helper->data = ConfigurationKPI::get('CONVERSION_RATE_CHART');
- }
- $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=conversion_rate';
- $kpis[] = $helper->generate();
+ // $helper = new HelperKpi();
+ // $helper->id = 'box-conversion-rate';
+ // $helper->icon = 'icon-sort-by-attributes-alt';
+ // //$helper->chart = true;
+ // $helper->color = 'color1';
+ // $helper->title = $this->l('Conversion Rate', null, null, false);
+ // $helper->subtitle = $this->l('30 days', null, null, false);
+ // if (ConfigurationKPI::get('CONVERSION_RATE_CHART') !== false) {
+ // $helper->data = ConfigurationKPI::get('CONVERSION_RATE_CHART');
+ // }
+ // $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=conversion_rate';
+ // $kpis[] = $helper->generate();
- $helper = new HelperKpi();
- $helper->id = 'box-carts';
- $helper->icon = 'icon-shopping-cart';
- $helper->color = 'color2';
- $helper->title = $this->l('Abandoned Carts', null, null, false);
- $helper->subtitle = $this->l('Today', null, null, false);
- $helper->href = $this->context->link->getAdminLink('AdminCarts').'&action=filterOnlyAbandonedCarts';
- $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=abandoned_cart';
- $kpis[] = $helper->generate();
+ // $helper = new HelperKpi();
+ // $helper->id = 'box-carts';
+ // $helper->icon = 'icon-shopping-cart';
+ // $helper->color = 'color2';
+ // $helper->title = $this->l('Abandoned Carts', null, null, false);
+ // $helper->subtitle = $this->l('Today', null, null, false);
+ // $helper->href = $this->context->link->getAdminLink('AdminCarts').'&action=filterOnlyAbandonedCarts';
+ // $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=abandoned_cart';
+ // $kpis[] = $helper->generate();
- $helper = new HelperKpi();
- $helper->id = 'box-average-order';
- $helper->icon = 'icon-money';
- $helper->color = 'color3';
- $helper->title = $this->l('Average Order Value', null, null, false);
- $helper->subtitle = $this->l('30 days', null, null, false);
- $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=average_order_value';
- $kpis[] = $helper->generate();
+ // $helper = new HelperKpi();
+ // $helper->id = 'box-average-order';
+ // $helper->icon = 'icon-money';
+ // $helper->color = 'color3';
+ // $helper->title = $this->l('Average Order Value', null, null, false);
+ // $helper->subtitle = $this->l('30 days', null, null, false);
+ // $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=average_order_value';
+ // $kpis[] = $helper->generate();
- $helper = new HelperKpi();
- $helper->id = 'box-net-profit-visit';
- $helper->icon = 'icon-user';
- $helper->color = 'color4';
- $helper->title = $this->l('Net Profit per Visit', null, null, false);
- $helper->subtitle = $this->l('30 days', null, null, false);
- $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=netprofit_visit';
- $kpis[] = $helper->generate();
+ // $helper = new HelperKpi();
+ // $helper->id = 'box-net-profit-visit';
+ // $helper->icon = 'icon-user';
+ // $helper->color = 'color4';
+ // $helper->title = $this->l('Net Profit per Visit', null, null, false);
+ // $helper->subtitle = $this->l('30 days', null, null, false);
+ // $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=netprofit_visit';
+ // $kpis[] = $helper->generate();
- $helper = new HelperKpiRow();
- $helper->kpis = $kpis;
- return $helper->generate();
- }
+ // $helper = new HelperKpiRow();
+ // $helper->kpis = $kpis;
+ // return $helper->generate();
+ // }
public function renderView()
{
|