How can I fix schema markup warnings on my online store?

Hi,shopify community,

i need help to fix warnings on my shopify store’s products.

Missing field “aggregateRating” (optional)

Missing field “review” (optional)

No global identifier provided (e.g., gtin, brand) (optional)
please help me to write a correct schema code that can fix these warnings completly.thanks in advance
sahmal

This is PageFly - Free Landing Page Builder. I would love to provide my recommendations for your store.

Regard your concern Schema warning on google search console

In general, the aggregate review field is added on your store, it just supposedly duplicates the product, and does not add information to the main one. And in this app, this is a problem that everyone faced.

The problem should be solved if you add such a piece of code to the sections/product-template.liquid file somewhere near the output of the product title:

{%- assign review_rating = false -%}
{% if product.metafields.spr.reviews %}
  {% capture review_data %}{{ product.metafields.spr.reviews }}{% endcapture %}

  {%- assign rating_keyword = '"ratingValue":' -%}
  {%- assign rd_a1 = review_data | split: rating_keyword -%}
  {%- assign rd_a2 = rd_a1[1] | split: "," -%}
  {%- assign rd_a3 = rd_a2[0] | replace: '"', "" -%}
  {%- assign review_rating = rd_a3 | plus: 1 | minus: 1 -%}

  {%- assign count_keyword = '"reviewCount":' -%}
  {%- assign rd_a1 = review_data | split: count_keyword -%}
  {%- assign rd_a2 = rd_a1[1] | split: "," -%}
  {%- assign rd_a3 = rd_a2[0] | replace: '"', "" -%}
  {%- assign review_count = rd_a3 | plus: 1 | minus: 1 -%}
{% endif %}

{%- if review_rating %}
  
    
    
  

{%- endif -%}

Hope this helps.

Best regards,

PageFly

Hi @matloobsahmal ,

You just need to install the app, it will work fine, because it need extra app to be able to enter product reviews. Refer https://apps.shopify.com/product-reviews

Hope it helps!