This page explains how to mark up your product reviews so that Google can display rich results (previously known as rich snippets). You will need have to technical experience to add this code.
These code below supports for Shopify store only, it is automatically applied for WooCommerce store.

If your Shopify theme is using MICRODATA then please add this  code to your product-template.liquid file 

  1. Go to your Shopify Themes menu
  2. Click the "Actions" menu and then select "Edit code"
  3. Open the template or section you use for product pages (usually it's called product.liquid or product-template.liquid, but some themes work differently)
  4. Click CTRL + F
  5. Search the following: http://schema.org/Product
  6. Find an element with this attribute, for example: <div itemscope itemtype=" http://schema.org/Product">
  7. Paste the following code beneath said code line:
{% assign ryviu = product.metafields.ryviu %}
{% if ryviu %}
{%- assign aggregateRating = ryviu.product_reviews_info | split: ";" -%}
  {%- assign r_avg = aggregateRating[1] | plus: 0 -%}
  {%- assign r_count = aggregateRating[0] | plus: 0 -%}
  {%- if r_count > 0 -%}  
    <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
      <meta itemprop="ratingValue" content="{{ r_avg }}"/>
      <meta itemprop="ratingCount" content="{{ r_count }}"/>
    </div>
  {%- endif -%}
{% endif %}  


If your Shopify  theme is using JSON-LD method then please add this code below to that script:

{% assign ryviu = product.metafields.ryviu %}
{% if ryviu %}
{%- assign aggregateRating = ryviu.product_reviews_info | split: ";" -%}
  {%- assign r_avg = aggregateRating[1] | plus: 0 -%}
  {%- assign r_count = aggregateRating[0] | plus: 0 -%}
  {%- if r_count > 0 -%}  
    "aggregateRating": {
            "@type": "AggregateRating",
            "ratingValue": "{{ r_avg }}",
            "reviewCount": "{{ r_count }}"
     },
      {%- endif -%}
{% endif %} 

After that, you can check the result by adding your product link from here:
Structured Data Testing Tool

If you're having trouble editing your Liquid code, please contact us and we'll be happy to assist!

All the best.

Ryviu team.

Did this answer your question?