Available for:
|
Star Ratings are important shorthand, symbolizing at a glance how people felt about a certain item. They reflect the average aggregated rating of a product's published reviews and offers an easy way to link shoppers to read full reviews on your site. Star Ratings also include the total amount of published reviews written about the product.
In this article, you'll learn how to add Star Rating to your main, category and collection pages.
- Go to your Shopify Themes menu and click Actions → Edit Code.
- Locate one of the following file names :
- product-grid-item.liquid, product-collection.liquid, product-card-grid.liquid, product-list-item.liquid, card-product.liquid, etc
-
Please be noted that the star rating should be added on the template file for product tiles. The file names above are the most common ones, however, the name could vary for different theme sets.
- Add the following code under {{ product.title }} element and click Save.
{% liquid
assign format = '${stars} (${reviews_count})'
assign formatStarsInput = '${stars}'
assign formatStarsParsed = '{{{stars}}}'
assign formatReviewsCountInput = '${reviews_count}'
assign formatReviewsCountParsed = '{{{reviews_count}}}'
%}
<span
class="crema-product-reviews-score"
data-product-code="{{ product.id }}"
data-hide-if-zero="1"
data-format="{{ format | replace: formatStarsInput, formatStarsParsed | replace: formatReviewsCountInput, formatReviewsCountParsed }}"
data-star-style="multiple"></span>
If you need help installing CREMA widgets on your vintage theme, feel free to chat us or email us at support.global@cre.ma