Page 1 of 1

Removing "Average Rating"

Posted: Sat Apr 17, 2010 2:18 am
by scoop
How do i go about removing or disabling "Average Rating: Not Rated" text you see on all products?

Thanks.

Re: Removing "Average Rating"

Posted: Sat Apr 17, 2010 2:51 am
by MrConn
If you wanna remove the rating-text alltogether you enter catalog/view/theme/YOURTHEME/template/product/product.tpl and delete the following:

Code: Select all

              <tr>
                <td><b><?php echo $text_average; ?></b></td>
                <td><?php if ($average) { ?>
                  <img src="catalog/view/theme/laptop/image/stars_<?php echo $average . '.png'; ?>" alt="<?php echo $text_stars; ?>" style="margin-top: 2px;" />
                  <?php } else { ?>
                  <?php echo $text_no_rating; ?>
                  <?php } ?></td>
              </tr>
And if you only wanna remove the text when the product isn't rated you change the code abow to this:

Code: Select all

              <?php if ($average) { ?>
              <tr>
                <td><b><?php echo $text_average; ?></b></td>
                <td>
                  <img src="catalog/view/theme/laptop/image/stars_<?php echo $average . '.png'; ?>" alt="<?php echo $text_stars; ?>" style="margin-top: 2px;" />
                 </td>
              </tr>
              <?php } ?>

Re: Removing "Average Rating"

Posted: Sat Apr 17, 2010 7:43 pm
by scoop
Thankyou very much!
Works like a charm.