From d3d089701201fec6f8f9b414e1c0486dbcc2e063 Mon Sep 17 00:00:00 2001 From: indesign47 Date: Mon, 7 Oct 2013 04:02:42 +0200 Subject: [PATCH] [-] MO : productcomments round average up not down 200 comments with 5 stars and only 1 with 4 stars give only 4 stars Thanks to manit4c --- modules/productcomments/productcomments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/productcomments/productcomments.php b/modules/productcomments/productcomments.php index 95e87fe61..078113f21 100644 --- a/modules/productcomments/productcomments.php +++ b/modules/productcomments/productcomments.php @@ -713,7 +713,7 @@ class ProductComments extends Module 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), 'criterions' => ProductCommentCriterion::getByProduct((int)Tools::getValue('id_product'), $this->context->language->id), 'action_url' => '', - 'averageTotal' => (int)$average['grade'], + 'averageTotal' => round($average['grade']), 'too_early' => ($customerComment && (strtotime($customerComment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) > time()), 'nbComments' => (int)(ProductComment::getCommentNumber((int)Tools::getValue('id_product'))) ));