Post by carlos1 » Sun Dec 28, 2014 4:18 am

Image

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();
- Find $percent = round($result['viewed'] / $product_viewed_total * 100, 2); and then replace it with the following code:

Code: Select all

$percent = round($result['viewed'] / $product_views_total * 100, 2);
2) Open file admin/model/report/product.php

- 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'];
	}
Regards.

Carlos S.

Newbie

Posts

Joined
Sun Dec 28, 2014 3:31 am

Post by RonLens » Mon Dec 29, 2014 5:59 pm

Tnaks for solving this bug

Newbie

Posts

Joined
Wed Dec 10, 2014 3:37 am
Location - Germany
Who is online

Users browsing this forum: DuckDuckGo [Bot] and 15 guests