
To solved this bug, you can to use VQMOD or OCMOD or make changes directly.
1) Open file admin/controller/report/product_viewed.php
- Find $product_viewed_total = $this->model_report_product->getTotalProductsViewed($data); and then insert the following code below:
Code: Select all
$product_views_total = $this->model_report_product->getTotalProductViews();
Code: Select all
$percent = round($result['viewed'] / $product_views_total * 100, 2);
- Add the follow function:
Code: Select all
public function getTotalProductViews() {
$query = $this->db->query("SELECT SUM(viewed) AS total FROM " . DB_PREFIX . "product");
return $query->row['total'];
}
Carlos S.