- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
PrestaShop 1.6.x. How to change default product rating
March 4, 2016
If a customer gives product comment but does not rate with the stars, the product gets 3 stars out of 5 by default. We’ll show you how to change default product rating in Prestashop and set default star rating for each criterion to 5 stars.
PrestaShop 1.6.x. How to change default product rating-
Go to the installation root of your site, open themeXXX/modules/productcomments/productcomments.tpl file.
- Search for the following code:
{if $criterions|@count > 0} <ul id="criterions_list"> {foreach from=$criterions item='criterion'} <li> <label>{$criterion.name|escape:'html':'UTF-8'}:</label> <div class="star_content"> <input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="1" /> <input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="2" /> <input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="3" checked="checked" /> <input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="4" /> <input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="5" /> </div> <div class="clearfix"></div> </li> {/foreach} </ul> {/if}
-
Move the checked=”checked” to the value=”5″ line so that it looks as follows:
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="5" checked="checked" />
-
After you’re done, save the changes and check the site.
That’s it! Now you know how to make default star rating for each criterion to be 5 stars.
Feel free to check the detailed video tutorial below:
PrestaShop 1.6.x. How to change default product rating