Post by smokelight » Thu Apr 19, 2012 1:02 pm

on my product page its show only the last 5 reviews how can i Chang it to show more then 5 reviews on a page ?
thanks in advanced

New member

Posts

Joined
Wed Nov 23, 2011 1:59 am

Post by Avvici » Thu Apr 19, 2012 1:10 pm

since you left no description in the title of your post as well as no mention of version of OC you are using I am going to assume you are using 1.5.2.1

This is the function where you set the limit of review listed. Default is 20.

Code: Select all

public function getReviewsByProductId($product_id, $start = 0, $limit = 20) {
		$query = $this->db->query("SELECT r.review_id, r.author, r.rating, r.text, p.product_id, pd.name, p.price, p.image, r.date_added FROM " . DB_PREFIX . "review r LEFT JOIN " . DB_PREFIX . "product p ON (r.product_id = p.product_id) LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE p.product_id = '" . (int)$product_id . "' AND p.date_available <= NOW() AND p.status = '1' AND r.status = '1' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY r.date_added DESC LIMIT " . (int)$start . "," . (int)$limit);
		
		return $query->rows;
	}

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by smokelight » Thu Apr 19, 2012 1:11 pm

im use 1.5.1.1

New member

Posts

Joined
Wed Nov 23, 2011 1:59 am

Post by mandamexico » Thu Apr 19, 2012 2:34 pm

The folder path to that public function is: catalog/model/catalog/
and is in the file review.php

- Christian

My Extensions

OpenCart Developer (OCD) Tools

Donate - If I ever helped you.


User avatar
Active Member

Posts

Joined
Mon Jun 29, 2009 10:14 am
Location - Los Angeles, CA

Post by smokelight » Thu Apr 19, 2012 9:29 pm

hello see i attach the catalog/model/catalog/
see my review.php let me know if you can fix it

Attachments


New member

Posts

Joined
Wed Nov 23, 2011 1:59 am

Post by mandamexico » Fri Apr 20, 2012 2:04 am

Nobody is going to do this for you. You will make the changes based on the help we are trying to give you.
If you want work done for you....go to the commercial support section of the forum.

My Extensions

OpenCart Developer (OCD) Tools

Donate - If I ever helped you.


User avatar
Active Member

Posts

Joined
Mon Jun 29, 2009 10:14 am
Location - Los Angeles, CA

Post by Avvici » Fri Apr 20, 2012 2:07 am

You've already double posted on this topic and it was solved for you on the other post using the control file command line in review.php here:

Code: Select all

$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 5, 5);

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC
Who is online

Users browsing this forum: No registered users and 31 guests