// Add units to goals configuration
This commit is contained in:
@@ -90,6 +90,7 @@ class Dashgoals extends Module
|
|||||||
$month_row['values'][$type] = ConfigurationKPI::get(strtoupper($key));
|
$month_row['values'][$type] = ConfigurationKPI::get(strtoupper($key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->context->smarty->assign('currency_code', $this->context->currency->iso_code);
|
||||||
$this->context->smarty->assign('goals_year', $year);
|
$this->context->smarty->assign('goals_year', $year);
|
||||||
$this->context->smarty->assign('goals_months', $months);
|
$this->context->smarty->assign('goals_months', $months);
|
||||||
return $this->display(__FILE__, 'dashboard_zone_two.tpl');
|
return $this->display(__FILE__, 'dashboard_zone_two.tpl');
|
||||||
@@ -97,9 +98,7 @@ class Dashgoals extends Module
|
|||||||
|
|
||||||
public function hookDashboardData($params)
|
public function hookDashboardData($params)
|
||||||
{
|
{
|
||||||
return array(
|
return array('data_chart' => array('dash_goals_chart1' => $this->getChartData()));
|
||||||
'data_chart' => array('dash_goals_chart1' => $this->getChartData()),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getChartData()
|
public function getChartData()
|
||||||
|
|||||||
@@ -51,11 +51,29 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{foreach $goals_months as $month}
|
{foreach $goals_months as $month}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$month.label}</td>
|
<td>
|
||||||
<td><input id="dashgoals_traffic_{$month@key}" name="dashgoals_traffic_{$month@key}" class="dashgoals_config_input form-control" value="{$month.values.traffic|intval}" /></td>
|
{$month.label}
|
||||||
<td><input id="dashgoals_conversion_{$month@key}" name="dashgoals_conversion_{$month@key}" class="dashgoals_config_input form-control" value="{$month.values.conversion|floatval}" /></td>
|
</td>
|
||||||
<td><input id="dashgoals_avg_cart_value_{$month@key}" name="dashgoals_avg_cart_value_{$month@key}" class="dashgoals_config_input form-control" value="{$month.values.avg_cart_value|intval}" /></td>
|
<td>
|
||||||
<td id="dashgoals_sales_{$month@key}" class="dashgoals_sales">0</td>
|
<input id="dashgoals_traffic_{$month@key}" name="dashgoals_traffic_{$month@key}" class="dashgoals_config_input form-control"
|
||||||
|
value="{$month.values.traffic|intval}" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="dashgoals_conversion_{$month@key}" name="dashgoals_conversion_{$month@key}" class="dashgoals_config_input form-control"
|
||||||
|
value="{$month.values.conversion|floatval}" />
|
||||||
|
<span class="input-group-addon">%</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-addon">{$currency_code|escape}</span>
|
||||||
|
<input id="dashgoals_avg_cart_value_{$month@key}" name="dashgoals_avg_cart_value_{$month@key}" class="dashgoals_config_input form-control"
|
||||||
|
value="{$month.values.avg_cart_value|intval}" />
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td id="dashgoals_sales_{$month@key}" class="dashgoals_sales">
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user