Retrieving spr reviews body content, heading and star rating only

Highlighted
New Member
2 0 0
Hello
Making a template that displays all product reviews that exist for products in collection all.
Currently is returning all reviews but also all the write a review buttons.
Only want the review text.

What do I need to specify to get this?
0 Likes
Shopify Expert
2686 67 696

The app has no options you can set, but you can either remove new review form with javascript of hide with CSS, like this:

/* hide only "write review" link */
.spr-summary-actions-newreview {
    display: none;
}
/* or hide summary star rating as well */
.spr-header {
    display: none;
}
Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
I am away till Feb-15.
0 Likes
Highlighted
New Member
2 0 0

At the moment I have

 

{% for product in collections['all'].products %}
    <div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div>
{% endfor %}

and it's returning a write review button, reviews and star rating for each product.

I can hide the buttons, but I'd also like to be able to put in the name of the product under each review. For example, I'd like it to look like this:

 

BEST PRODUCT EVER! (title)

Totally the best thing I've ever bought - yay! (content)

***** (star rating)

Karen Smith on 19 Jan 2020 (By line) reviewed (product name)

 

Is there a list of objects I can call to do this?

 

0 Likes
Highlighted
Shopify Expert
2686 67 696

Again, there is not much you can do with the app.

 

You may have a look at these articles by @Jason 

https://freakdesign.com.au/blogs/news/show-multiple-shopify-product-reviews-on-one-page 

https://freakdesign.com.au/blogs/news/150719175-show-shopify-product-reviews-as-an-average-for-the-e... 

However, the app has changed recently, so some parsing code may need revision.

 

Generally, I'd do something like:

{% for product in collections['all'].products %}
<div class="product-reviewed">{{ product.title }} </div>
{% if product.metafields.spr.reviews %} <div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div>
{% endif %} {% endfor %}

Not sure if you can do exactly what you wanted with liquid, but cane done with some Javascript post-processing.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
I am away till Feb-15.
0 Likes