Post by wahab.apex » Tue Dec 11, 2018 7:52 pm

Can anyone help me? i want to display review count in category.tpl too.. its only display on product page .......... please help

Newbie

Posts

Joined
Tue Apr 10, 2018 2:00 pm

Post by straightlight » Wed Dec 12, 2018 7:17 pm

In catalog/controller/product/category.php file,

find:

Code: Select all

'rating'      => 
add below:

Code: Select all

'total_reviews' => sprintf($this->language->get('tab_review'), $result['reviews']),
Then, in your category.tpl file - in the category foreach loop, you could add:

Code: Select all

<?php echo $product['total_reviews']; ?>

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 181 guests