A way to access a single product's rating (i.e 3.75) and total number of reviews (i.e. 16 reviews)
Currently there's no easy way to access a single product's rating and total number of reviews. {{ product.metafields.judgeme.badge }} gets your HTML that contains the stars and number of ratings, but there's nothing like {{ product.metafields.judgeme.rating}} or {{ product.metafields.judgeme. total_reviews }}.
Similarly, there's no way to download a report that contains the product, number of reviews associated with that product, and its rating.
Comments: 3
-
27 Dec, '21
Pedro PedruzziThis is the single reason we will probably have to pick another review app. We have a mobile app and we need to create and render our own reviews widgets. The current API doesn't allow one to read the data in batch (for example, to render the star rating on each product on a search result screen or collection screen). It should be pretty straight forward to publish these data in metafield (either JSON or one for each attribute).
-
27 Dec, '21
Sergio Kiyoshi YamadaExcellent suggestion! We also need this feature to integrate our app via API.
I could see that Stamped.io has the widget and badge as well and both metafields that we need: stamped.reviews_average and stamped.reviews_count -
21 Jan, '22
Lily AdminHi all,
If you need to display a product's average rating and its total number of reviews in a specific location on your store, you can use Judge.me metafields:
{{ product.metafields.reviews.rating.value }} lets you display the average rating (e.g. "value": "3.5")
{{ product.metafields.reviews.rating_count }} lets you display the number of reviews (e.g. 125)
Check this article for more details: https://support.judge.me/support/solutions/articles/44002295100-how-to-get-product-ratings-and-total-number-of-reviews-via-judge-me-metafields-reviews-rating-and-reviews-rating-count-
Best,