diff --git a/modules/dashproducts/dashproducts.php b/modules/dashproducts/dashproducts.php
index dc5ea3525..c02c03ee6 100644
--- a/modules/dashproducts/dashproducts.php
+++ b/modules/dashproducts/dashproducts.php
@@ -257,34 +257,34 @@ class Dashproducts extends Module
'id' => 'product',
'value' => '
',
'class' => 'text-center',
- );
+ );
$tr[] = array(
'id' => 'product',
'value' => Tools::htmlentitiesUTF8($product_obj->name).'
'.Tools::displayPrice(Product::getPriceStatic((int)$product_obj->id)),
'class' => 'text-center',
- );
+ );
$tr[] = array(
'id' => 'views',
'value' => $product['counter'],
'class' => 'text-center',
- );
+ );
$added_cart = $this->getTotalProductAddedCart($date_from, $date_to, (int)$product_obj->id);
$tr[] = array(
'id' => 'added_to_cart',
'value' => $added_cart,
'class' => 'text-center',
- );
+ );
$purchased = $this->getTotalProductPurchased($date_from, $date_to, (int)$product_obj->id);
$tr[] = array(
- 'id' => 'purchased',
+ 'id' => 'purchased',
'value' => $this->getTotalProductPurchased($date_from, $date_to, (int)$product_obj->id),
'class' => 'text-center',
- );
+ );
$tr[] = array(
- 'id' => 'rate',
- 'value' => (!$purchased ? '-' : ($added_cart*100)/$purchased.'%'),
+ 'id' => 'rate',
+ 'value' => ($product['counter'] ? round(100 * $purchased / $product['counter'], 1).'%' : '-'),
'class' => 'text-center',
- );
+ );
$body[] = $tr;
}