Hi,
You can edit the file "yourSite\components\com_hikashop\`views\product\view.html.php", and in the function "show()" add the code:
$database = JFactory::getDBO();
$query = 'SELECT vote_rating FROM '.hikashop_table('vote').' WHERE vote_ref_id = '.$product_id;
$database->setQuery($query);
$votes = $database->loadResultArray();
$config = hikashop_config();
$total_star = $config->get('vote_star_number');
$rates = array();
foreach($votes as $vote){
for($i=1; $i <= $total_star; $i++){
if($vote == $i){
$rates[$i]++;
}
}
}
for($i=1; $i <= $total_star; $i++){
if(!isset($rates[$i]) || $rates[$i] == null) $rates[$i] = 0;
}
krsort($rates);
$this->assignRef('rates',$rates);
Just after:
if(empty($product_id)){
if (is_object( $menu )) {
jimport('joomla.html.parameter');
$category_params = new HikaParameter( $menu->params );
$product_id = $category_params->get('product_id');
JRequest::setVar('product_id',$product_id);
}
}
if(empty($product_id)){
return;
}
And then in the view "product / show_default" (in HikaShop > Display > Views), you have the variable "$this->rates" which have all the informations for your "vote statistics" point.
For the spam reporting, the functionality is not available for the moment.