d
Topic
Pascal Member
Posts:
27
12 months ago

Product Reviews: hide stars when no review

Hello, 

I use Product Reviews to display a number of stars directly beneath the title of my product in product page

 

so this is my shop, first URL with comments and second URL without comments:

https://www.tresor-ethnique.com/collections/tibetain/products/pendentif-mandala

https://www.tresor-ethnique.com/collections/tibetain/products/pendentif-fleur-de-mandala

 

I would like to be able to hide Product Reviews when I have no comments

So I know how to remove the text when no comments (in the app), but I can't figure a way to remove the stars

 

Yet I know there must be a way, since the integration on Product Reviews in the collection page do not display anything when there are no comments

(see this URL for example: https://www.tresor-ethnique.com/collections/bijoux )

 

Any ideas?

Let me know, thanks ! :)

 

 

 

 

i
Replies
Jason Shopify Expert freakdesign.com.au
Posts:
9252
12 months ago

This is a super old post of mine that I assume is still valid:
https://freakdesign.com.au/blogs/news/41175105-remove-zero-rating-reviews-from-the-shopify-review-app

If you don't feel like reading the post the general idea is to add some custom CSS. This css:

.spr-badge[data-rating="0.0"] {
    visibility:hidden; display: none;
}

If that doesn't work anymore drop a reply and we can take a closer look.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
Pascal Member
Posts:
27
12 months ago

Worked like a charm, thank you so much! :)

Posts:
3
8 months ago
g
1
upvotes

Hello,

I tried the code but it does not work for me? I am using Minimal theme.

Posts:
1
Last edited 8 months ago

Also having trouble with it?  Your site doesn't specify where to install it, it just says "add to the bottom of your stylesheet."

I added the code to the bottom of theme.scss.liquid, is that the correct one?

I am still seeing the review boxes on my site.  www.zen-bazaar.com

 

Although, another question: if it's hidden when there are zero reviews...how does anyone have the ability to give the first review?

Posts:
13
8 months ago

The review keeps glitching and showing it for a second and then it disappears. How do you fix this?

Posts:
3
8 months ago

Hi, the code does not work for me. Any other suggestions? :)

Posts:
5
about 1 month ago

worked great for me on the debut theme. 

Posts:
4
13 days ago

Amazing! It worked perfectly with my site!!