Page 1 of 1

Remove rating (stars) from reviews

Posted: Fri Mar 16, 2012 9:02 am
by jessicadg
HI,
I searched for such a topic but couldn't find anything so I decided to post it here and hopefully someone can help.
I am new to OpenCart...decided to give it a go after few Magento instals/uninstalls (was too.... complicated) :)
So far everything goes fine and I am happy I picked OC for my shop.
I spent few hours trying to disable (remove) rating (stars) from Reviews. No matter what icon will go there - I just don't want to see the stars! (I cant stand them)
I tried with product.tpl but when I remove the rating it's still ask me to rate. I guess it is the JS somewhere in the template but couldn't find it.

I want to keep the Reviews in the format they are, just want to disable the star rating.
Any help is welcome

Thanks

Re: Remove rating (stars) from reviews

Posted: Fri Mar 16, 2012 10:49 am
by MarketInSG
Easy. Just edit the following files:

In catalog/view/theme/default/template/product/product.tpl

Find & remove

Code: Select all

<img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" />
Find

Code: Select all

<b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span>&nbsp;
    <input type="radio" name="rating" value="1" />
    &nbsp;
    <input type="radio" name="rating" value="2" />
    &nbsp;
    <input type="radio" name="rating" value="3" />
    &nbsp;
    <input type="radio" name="rating" value="4" />
    &nbsp;
    <input type="radio" name="rating" value="5" />
    &nbsp; <span><?php echo $entry_good; ?></span><br />
    <br />
Edit to

Code: Select all

<input type="hidden" name="rating" value="5" />
And in catalog/view/theme/default/template/module/ (featured.tpl, latest.tpl, specials.tpl, bestseller.tpl)
Find and remove

Code: Select all

        <?php if ($product['rating']) { ?>
        <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
        <?php } ?>
That's all the place if I didn't remember wrongly. :D

Re: Remove rating (stars) from reviews

Posted: Fri Mar 16, 2012 8:12 pm
by jessicadg
Hi MarketInSG,
thanks for your effort but unfortunately it didn't work. I follow all the steps from your post but No!
It still ask me to select review rating...
The Stars dont appear but I cant submit the review as the system asks me to rate....
I think it is something to do with Ajax down at the bottom of the product.tpl but cant find it...
It drives me mad...thought its something easy and quick to do :(
By the way I am using the latest version of OpenCart - 1.5.2.1

Please Help!

If I cant remove the ratings(starts) I have to totally remove Reviews and find some module or extension to replace the default OC Review system ( just because of few stars!!! ) :( :(

Re: Remove rating (stars) from reviews

Posted: Fri Mar 16, 2012 8:30 pm
by MarketInSG
Remove review system, use our Facebook mod: http://www.opencart.com/index.php?route ... order=DESC

You have to remove accordingly. If you are not using default theme, then remove from your respective theme.

Re: Remove rating (stars) from reviews

Posted: Fri Mar 16, 2012 8:45 pm
by MarketInSG
Find

Code: Select all

<b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span>&nbsp;
    <input type="radio" name="rating" value="1" />
    &nbsp;
    <input type="radio" name="rating" value="2" />
    &nbsp;
    <input type="radio" name="rating" value="3" />
    &nbsp;
    <input type="radio" name="rating" value="4" />
    &nbsp;
    <input type="radio" name="rating" value="5" />
    &nbsp; <span><?php echo $entry_good; ?></span><br />
    <br />
edit to

Code: Select all

<input type="radio" name="rating" value="1" style="display:none"/>
    &nbsp;
    <input type="radio" name="rating" value="2" style="display:none"/>
    &nbsp;
    <input type="radio" name="rating" value="3" style="display:none"/>
    &nbsp;
    <input type="radio" name="rating" value="4" style="display:none"/>
    &nbsp;
    <input type="radio" name="rating" value="5" style="display:none" checked/><br>

Re: Remove rating (stars) from reviews

Posted: Fri Mar 16, 2012 8:45 pm
by MarketInSG
This time I tested first....confirmed to work.

Re: Remove rating (stars) from reviews

Posted: Fri Mar 16, 2012 9:04 pm
by jessicadg
Ah MarketInSG,
I am in love :) :) :)

Worked like charm!

Thank You

Re: Remove rating (stars) from reviews

Posted: Sat Mar 16, 2013 1:29 am
by matt71
Or...

You can do what I just did to hide the stars.

Find the "star" image files in your templates image folder and simply replace their content with a placeholder. In this case, I just downloaded the files, opened them in Photoshop, used the erase tool to erase the stars, saved them as the same file names and then reuploaded them.

Worked like a charm. Just save the original files in case you decide to reactive them again.

Matt

Re: Remove rating (stars) from reviews

Posted: Wed Aug 27, 2014 2:43 am
by classic_rock
Hello,
after I edited files that you mentioned above, it works and rating was removed from reviews, but I have this error :
Notice: Undefined index: name in /home/musicfor/public_html/shop/vqmod/vqcache/vq2-catalog_controller_product_product.php on line 174

How can I fix this error?

Re: Remove rating (stars) from reviews

Posted: Thu Aug 28, 2014 4:18 pm
by MarketInSG
that's an unrelated error in your controller file.

Re: Remove rating (stars) from reviews

Posted: Wed Dec 28, 2016 5:22 pm
by bavl
MarketInSG wrote:Find

Code: Select all

<b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span>&nbsp;
    <input type="radio" name="rating" value="1" />
    &nbsp;
    <input type="radio" name="rating" value="2" />
    &nbsp;
    <input type="radio" name="rating" value="3" />
    &nbsp;
    <input type="radio" name="rating" value="4" />
    &nbsp;
    <input type="radio" name="rating" value="5" />
    &nbsp; <span><?php echo $entry_good; ?></span><br />
    <br />
edit to

Code: Select all

<input type="radio" name="rating" value="1" style="display:none"/>
    &nbsp;
    <input type="radio" name="rating" value="2" style="display:none"/>
    &nbsp;
    <input type="radio" name="rating" value="3" style="display:none"/>
    &nbsp;
    <input type="radio" name="rating" value="4" style="display:none"/>
    &nbsp;
    <input type="radio" name="rating" value="5" style="display:none" checked/><br>
I've tried this a few times, and every time it messed up the order of the tabs of my product page. Didn't get read of the stars though