// Fix on module product comment for context

This commit is contained in:
rMalie
2011-08-05 14:21:16 +00:00
parent 4c5104462f
commit 1816946216
+2 -2
View File
@@ -508,6 +508,7 @@ class ProductComments extends Module
if (!$customerComment OR ($customerComment AND (strtotime($customerComment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) < time()))
{
$errors = array();
$customer_name = false;
if ($id_guest AND (!$customer_name = Tools::getValue('customer_name')))
$errors[] = $this->l('Please fill your name');
@@ -575,8 +576,7 @@ class ProductComments extends Module
'too_early' => ($customerComment AND (strtotime($customerComment['date_add']) + Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')) > time()),
'delay' => Configuration::get('PRODUCT_COMMENTS_MINIMAL_TIME')));
$controller = new FrontController();
$controller->pagination((int)ProductComment::getCommentNumber((int)Tools::getValue('id_product')));
$this->context->controller->pagination((int)ProductComment::getCommentNumber((int)Tools::getValue('id_product')));
return ($this->display(__FILE__, '/productcomments.tpl'));
}