Answers for "product review count shopify"

0

product review count shopify

## If you want display fully auto generate reivew element
<div id="shopify-product-reviews" data-id="{{product.id}}">
	{{ product.metafields.spr.reviews }}
</div>

reference:
https://help.shopify.com/en/manual/products/product-reviews/installation#add-review-score-badges-to-your-collection-pages-in-sectioned-themes-sectioned-themes-specific
Posted by: Guest on June-13-2021
0

product review count shopify

## If you want to display count separately

{% assign review_count_value = 0 %}
{% if product.metafields.spr.reviews %}
  {% capture review_data %}{{ product.metafields.spr.reviews }}{% endcapture %}
  {% assign review_data1 = review_data | split: "reviewCount" %}
  {% assign review_data2 = review_data1[1] | split: "=" %}
  {% assign review_data3 = review_data2 | split: '"' %}
  {% assign review_data4 = review_data3[3] | slice: 0 %}
  {% assign review_count_value = review_data4 | plus: 1 | minus: 1 %}
{% endif %}

<span class="shopify-product-reviews-count">
	{{ review_count_value }}
</span>
Posted by: Guest on June-13-2021

Code answers related to "product review count shopify"

Browse Popular Code Answers by Language