Skip to content

Commit

Permalink
Merge pull request #71 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Release version 2.1.3
  • Loading branch information
Hlavtox authored Nov 28, 2023
2 parents e2cbdb0 + 62c51eb commit c1661f1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@

Enrich your dashboard, display a graphical representation of your store’s development.

## Compatibility

PrestaShop: `1.7.6.0` or later

## How to test

If module is enabled, check that the chart will be visible in the main Dashboard page.

Link to specs: https://docs.prestashop-project.org/functional-documentation/functional-documentation/ux-ui/back-office/improve/modules/dashboard-trends-dashtrends

Link to test scenario: https://build.prestashop-project.org/test-scenarios/scenarios/modules/dashtrends.html

## Reporting issues

You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue].
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>dashtrends</name>
<displayName><![CDATA[Dashboard Trends]]></displayName>
<version><![CDATA[2.1.2]]></version>
<version><![CDATA[2.1.3]]></version>
<description><![CDATA[Adds a block whith the evolution of your stores main numbers along with a graphic.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[dashboard]]></tab>
Expand Down
5 changes: 2 additions & 3 deletions dashtrends.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct()
{
$this->name = 'dashtrends';
$this->tab = 'administration';
$this->version = '2.1.2';
$this->version = '2.1.3';
$this->author = 'PrestaShop';

parent::__construct();
Expand Down Expand Up @@ -73,7 +73,6 @@ public function hookDashboardZoneTwo($params)
{
$this->context->smarty->assign([
'currency' => $this->context->currency,
'_PS_PRICE_DISPLAY_PRECISION_' => _PS_PRICE_DISPLAY_PRECISION_,
]);

return $this->display(__FILE__, 'dashboard_zone_two.tpl');
Expand Down Expand Up @@ -271,7 +270,7 @@ protected function translateCompareData($normal, $compare)

$translated_array[$key] = [];
foreach ($date_array as $compare_date => $value) {
$translation = $normal_min + ($compare_date - $compare_min) * ($normal_size / $compare_size);
$translation = $compare_size == 0 ? 0 : $normal_min + ($compare_date - $compare_min) * ($normal_size / $compare_size);
$translated_array[$key][number_format($translation, 0, '', '')] = $value;
}
}
Expand Down
2 changes: 1 addition & 1 deletion views/templates/hook/dashboard_zone_two.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
var currency_format = {$currency->format|floatval};
var currency_sign = '{$currency->sign|@addcslashes:'\''}';
var currency_blank = {$currency->blank|intval};
var priceDisplayPrecision = {$_PS_PRICE_DISPLAY_PRECISION_|intval};
var priceDisplayPrecision = 0;
</script>
<div class="clearfix"></div>
<section id="dashtrends" class="panel widget">
Expand Down

0 comments on commit c1661f1

Please sign in to comment.