From f20a3eb9b5513221e18600209bb49b608247be00 Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Thu, 12 Sep 2013 18:15:22 +0200 Subject: [PATCH] // Fixed most viewed conversion rate --- modules/dashproducts/dashproducts.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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; }