Rapid Reviews / Star Rating - Product Page
Star Rating - Product Page
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.
Link To Product Page & Show Questions View By Default
If you choose to show a questions label as part of the star rating badge, you can link directly to the page questions by adding ?rr_q=1#rapid_reviews_items
to your url. In this case the query parameter rr_q=1
is saying “Activate questions tab by default” and #rapid_reviews_items
is saying “Jump to the main reviews widget.”
~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>
<!--
DISPLAY REVIEWS LABEL AFTER COUND
-->
<div class="rapid_reviews_stars_badge" data-label="review ratings"></div>
<!--
DISPLAY QUESTIONS COUNT AS WELL
-->
<div class="rapid_reviews_stars_badge" data-q="1"></div>
<!--
DISPLAY QUESTIONS COUNT WITH LABEL OVERRIDE
-->
<div class="rapid_reviews_stars_badge" data-q="1" data-q_label="inquiries"></div>
<!--
MANUAL INIT AFTER CORE SCRIPT EXECUTED
E.G. MAYBE YOU HAVE A MODAL THAT IS TRIGGERED ON CLICK
-->
<script>
window.rr_drawStarsBadge()
</script>
<!--
CORE SCRIPT NEEDED ON PAGE
-->
<script>
;(function(){
if (window.r_u_loaded) return; window.r_u_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-core';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(rvsc, s);
})();
</script>