Categories

Featured templates

PrestaShop 1.6.x. How to change default product rating

Harry Baker March 4, 2016
Rating: 4.1/5. From 8 votes.
Please wait...

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
  1. Go to the installation root of your site, open themeXXX/modules/productcomments/productcomments.tpl file.

  2. 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}
  3. 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" />
  4. 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
Prestashop Themes Download
This entry was posted in PrestaShop Tutorials and tagged default, Prestashop, product, rating. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket