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
thanks in advanced
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.
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;
}
The folder path to that public function is: catalog/model/catalog/
and is in the file review.php
- Christian
and is in the file review.php
- Christian
My Extensions
OpenCart Developer (OCD) Tools
Donate - If I ever helped you.
hello see i attach the catalog/model/catalog/
see my review.php let me know if you can fix it
see my review.php let me know if you can fix it
Attachments
review.php
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.
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.
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);
Who is online
Users browsing this forum: No registered users and 11 guests