How do I display my store's star ratings?

Follow these steps to display the average rating and the total number of reviews for all your store's products:

  1. Go to your Shopify Themes menu
  2. Click the "Actions" menu and then select "Edit code"
  3. Open the liquid that you wish to add the star ratings to
  4.  Paste the code below where you want the ratings to appear:

    {% if shop.metafields.loox["global_stats"] %}
    {% assign looxstats = shop.metafields.loox["global_stats"] | split: ',' %}
    <div class="loox-rating loox-rating-hp" data-rating="{{ looxstats[0] }}" data-raters="{{ looxstats[1] }}"></div>
    {% endif %}
  5. Optional styling:
    To make the stars and ratings bigger and centered on the page add this code above the previous:

    <style>
    .loox-rating-hp.loox-rating { font-size:50px; text-align:center; }
    </style>

If you need any help, please contact us and we'll be happy to assist!