Hey guys,
I would ask if there can be any way to make all reviews for a product appear on one single page, instead of being paginated to just 5 per page. I need this because an extension for seo is screwing things up and it just allows to see the first page.
Thanks so much for the help.
Blessings and much love
Sander
I would ask if there can be any way to make all reviews for a product appear on one single page, instead of being paginated to just 5 per page. I need this because an extension for seo is screwing things up and it just allows to see the first page.
Thanks so much for the help.
Blessings and much love
Sander
well, did you try to change this line: (OC v.1.5.6.x !)
to this:
in this file:
... theme/default/template/product/review.tpl (or, if you use a custom theme, in your theme...)
in order to just raise the pagination Value, instead of removing pagination.
Just an strange idea, I never played around with reviews.
Ernie
Code: Select all
<div class="reviews"><?php for ($i = 1; $i <= 5; $i++) {
Code: Select all
<div class="reviews"><?php for ($i = 1; $i <= 500; $i++) {
... theme/default/template/product/review.tpl (or, if you use a custom theme, in your theme...)
in order to just raise the pagination Value, instead of removing pagination.
Just an strange idea, I never played around with reviews.
Ernie
Last edited by IP_CAM on Tue Jun 27, 2017 6:43 pm, edited 2 times in total.
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Yes, it's possible.
Open this file:
and remove limit from end of this query:
It should be:
Then remove reviews pagination from your theme. you don't need them anymore.
Open this file:
Code: Select all
catalog/model/catalog/review.php
Code: Select all
$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);
Code: Select all
$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 ");
Thanks so much for your answers IP_CAM and Digitart.
@IP_CAM - My version of OC is 1.5.5.1 the file review.tpl I can only find in catalog/view/theme/default/template/ , but there is no such line as <div class="reviews"><?php for ($i = 1; $i <= 5; $i++) {
to be able to work on
@Digitcart thank you, I used your code modification and it works, it shows all the reviews on the first page...but it remains the need remove the pagination from the template, any suggestions?
Thanks so much for your time guys.
Much love
Sander
@IP_CAM - My version of OC is 1.5.5.1 the file review.tpl I can only find in catalog/view/theme/default/template/ , but there is no such line as <div class="reviews"><?php for ($i = 1; $i <= 5; $i++) {
to be able to work on
@Digitcart thank you, I used your code modification and it works, it shows all the reviews on the first page...but it remains the need remove the pagination from the template, any suggestions?
Thanks so much for your time guys.
Much love
Sander
You are welcome.
In default theme reviews pagination is in this file:
remove:
In default theme reviews pagination is in this file:
Code: Select all
catalog/view/theme/default/template/product/review.tpl
Code: Select all
<div class="pagination"><?php echo $pagination; ?></div>
Hello,DigitCart wrote: ↑Tue Jun 27, 2017 6:41 pmYes, it's possible.
Open this file:and remove limit from end of this query:Code: Select all
catalog/model/catalog/review.php
It should be:Code: Select all
$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);
Then remove reviews pagination from your theme. you don't need them anymore.Code: Select all
$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 ");
I need your help too, I installed OC 3.0.2.0 and custom theme.
I have removed from limit
Code: Select all
catalog/model/catalog/review.php
Now product show all the reviews but error show on the header top.
Notice: Undefined variable: limit in /home/www/example.com/catalog/model/catalog/review.php on line 55
I really appreciate your help.
Thank you!
Who is online
Users browsing this forum: No registered users and 103 guests