[-] MO : BugFix : #PSCFV-2821 : ProductComment module does not save grade with only one criterion

This commit is contained in:
vChabot
2012-06-14 09:24:28 +00:00
parent ed05ca3e0b
commit ccd96a98ef
@@ -118,7 +118,7 @@ class ProductCommentsDefaultModuleFrontController extends ModuleFrontController
$product_comment_criterion->addGrade($comment->id, $grade);
}
if (count(Tools::getValue('criterion')) > 1)
if (count(Tools::getValue('criterion')) >= 1)
{
$comment->grade = $grade_sum / count(Tools::getValue('criterion'));
// Update Grade average of comment