Jump to content

Probleme avec description des articles


Recommended Posts

Bonjour,

 

J'ai réussi à résoudre mes problèmes avec le thème Culturaresp mais un autre vient d'arriver.

 

Quand je clique sur un produit afin de voir sa description, ce message d'erreur apparaît:

Fatal error: Call to undefined method ProductController::getProduct() in /home/decomeub/www/modules/productcomments/productcomments.php on line 734

 

Pourriez-vous m'aider?

 

MERCI.

Link to comment
Share on other sites

Bonjour,

 

Pourriez vous nous afficher un bout de code correspondant à l'erreur : de la ligne 730 à 740 pour voir ce qu'il s'y passe.

Vous avez modifié le fichier vous même à la main ?

Le problème c'est que je ne sais pas accéder à cette information, je mets ce que je pense être votre demande:

 

$image = Product::getCover((int)Tools::getValue('id_product'));
 
$this->context->smarty->assign(array(
'id_product_comment_form' => (int)Tools::getValue('id_product'),
'product' => $this->context->controller->getProduct(),
'secure_key' => $this->secure_key,
'logged' => (int)$this->context->customer->isLogged(true),
'allow_guests' => (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'),
'productcomment_cover' => (int)Tools::getValue('id_product').'-'.(int)$image['id_image'],
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
'criterions' => ProductCommentCriterion::getByProduct((int)Tools::getValue('id_product'), $this->context->language->id),
'action_url' => '',
'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')))
));
 
return ($this->display(__FILE__, '/productcomments-extra.tpl'));
}
 
    public function hookProductTabContent($params)
    {
$this->context->controller->addJS($this->_path.'js/jquery.rating.pack.js');
$this->context->controller->addJS($this->_path.'js/jquery.textareaCounter.plugin.js');
$this->context->controller->addJS($this->_path.'js/productcomments.js');
 
$id_guest = (!$id_customer = (int)$this->context->cookie->id_customer) ? (int)$this->context->cookie->id_guest : false;
$customerComment = ProductComment::getByCustomer((int)(Tools::getValue('id_product')), (int)$this->context->cookie->id_customer, true, (int)$id_guest);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...