Product Comments module error against popular prestashop theme



  • The module works with the stock TB theme, but when applying the warehouse theme from envato (one of the most popular) the theme’s product ratings module can’t connect correctly and throws this error.

    [ThirtyBeesException]

    Class ‘ProductComment’ not found
    at line 26 in file modules/ratingsproductlist/ratingsproductlist.php

    1. 	include_once (_PS_MODULE_DIR_ . 'productcomments/ProductComment.php');
      
    2. 	if (!isset($product)) {
      
    3. 		return;
      
    4. 	}
      
    5. 	$grade = ProductComment::getAverageGrade($product);
      
    6. 	$this -> context -> smarty -> assign(array('empty_grade' => 1));
      
    7. 	if (isset($grade['grade']))
      
    8. 		$this -> context -> smarty -> assign(array('empty_grade' => 0));
      
    9. 	$this -> context -> smarty -> assign(array(
      
    10. 		'average_total' => round($grade['grade']),

  • administrators

    Try creating the file /modules/productcomments/ProductComment.php, with the following content – maybe that solves it:

    <?php
    
    require_once __DIR__.'/productcomments.php';
    
    class ProductComment extends ProductCommentsModule\ProductComment
    {
    }
    


  • @mdekker Seems to be working. You are awesome. Hoping this platform keeps rolling forward. Can’t stand dealing with PS anymore.


Log in to reply
 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.