Rapid Reviews / Star Rating

Star Rating

First ensure that the Core Liquid & Scripts have been configured.

The Star Rating Snippet will show a star rating and link to any Reviews & Questions widget on the page. Note that this widget is only applicable to the respective page’s Shopify entity type, like product, collection, or page.

If you would like to show a star rating inside of collection result tiles, please reference our Liquid & Metafield Access.

Rapid Reviews Star Rating

~CE

<!-- 
  SIMPLE PRODUCT PAGE EXAMPLE FOR MAIN PRODUCT
  CORE SCRIPT & LIQIUD DATA ENABLED
  LINKS TO REVIEWS WIDGET BY DEFAULT
-->
<div class="rapid_reviews_stars_badge"></div>

<!-- 
  COLLECTION PAGE EXAMPLE
  CORE SCRIPT ENABLED WITH DATA ATTRIBUTES
  THIS WOULD BE AN EXAMPLE FOR ADDING PRODUCT RATINGS TO A COLLECTION PAGE PRODUCT LIST 
-->
{% assign avg = product.metafields.rapid_reviews.counts.value.r.rating.avg %}
{% unless avg %}{% assign avg = 0 %}{% endunless %}
{% assign count = product.metafields.rapid_reviews.counts.value.r.counts.core.total %}
{% unless count %}{% assign count = 0 %}{% endunless %}
<div class="rapid_reviews_stars_badge" data-avg="{{ avg }}" data-count="{{ count }}" data-url="{{ product.url }}"></div>

<!-- 
  MANUAL INIT AFTER CORE SCRIPT EXECUTED
  E.G. MAYBE YOU HAVE A MODAL THAT IS TRIGGERED ON CLICK
-->
<script>
  window.rr_drawStarsBadge()
</script>

<!-- JUST HTML -->
<div class="rapid_reviews_stars_badge">
  <a href="https://google.com" tabindex="0" aria-label="Product review average of 4.8">
    <span class="r_stars">
      <span class="r_stars_inner">
        <span class="r_stars_on" style="width:96.00%">
      </span>
    </span>
  </span> (22k)
  </a>
</div>
HTML