Rapid Reviews / Global Reviews Badge

Global Reviews Badge

The Global Reviews Badge shows the aggregate count and average rating of all reviews across your entire shop. You may choose to put this on your homepage, or some other informational page where you’d like to give your potential customers an overview of all review activity.

Add this through your Shopify admin with App Blocks.

Rapid Reviews Global Reviews Badge


Rapid Reviews Global Reviews Badge

~CE

<div id="rapid_reviews_global_reviews_badge" class="rapid_reviews_global_reviews_badge"></div>

<script>
  // DATA DEFINITION FROM SHOPIFY METAFIELDS
  // ONLY NEEDED ONCE PER PAGE
  window.rapid_reviews_global_data = window.rapid_reviews_global_data || {
    data: {% if shop.metafields.rapid_reviews.data %}{{ shop.metafields.rapid_reviews.data }}{% else %}null{% endif %},
    counts: {% if shop.metafields.rapid_reviews.counts %}{{ shop.metafields.rapid_reviews.counts }}{% else %}null{% endif %}
  }

  // GLOBAL WIDGET SCRIPT - DIFFERENT FROM CORE SCRIPT
  // ONLY NEEDED ONCE PER PAGE
  ;(function(){
    if (window.r_u_g_loaded) return; window.r_u_g_loaded = 1;
    var rvsc = document.createElement('script'); rvsc.type = 'text/javascript'; rvsc.async = 'true';
    rvsc.src = 'https://apps.belkapp.com/api/reviews/files/{{ shop.permanent_domain }}/rapid-reviews-global';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(rvsc, s);
  })();
</script>
HTML