Shopify Review App / Show only the stars on Collection pages

Melissa_O
New Member
6 0 0

I am looking for an easy way to only show stars on the collection pages for products. 

I found the following to remove the entire badge for products with no reviews, this is great but it also affects the product pages.

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

 Im looking for something I can use that will only affect the collection pages and not the product pages. 

Goal: Display only the stars for all reviewed products on collection pages (no reviews no empty stars) No text of any kind after stars on collection page. I would like the product pages to stay exactly as they are. 

Thanks for any advice or tips. 

Melissa

 

0 Likes
Alexandru_Derev
Shopify Partner
86 3 20

Hi Melissa,

did you manage to find the solution to the problem you've described?

Alex Dereveanco | CMO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Melissa_O
New Member
6 0 0

Hi Alex,

Thanks for asking. No. No solution yet. You have any ideas?

0 Likes
Jason
Shopify Expert
10354 155 1989

This would differ from theme to theme but for your current one, this should work:

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

 

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes
Melissa_O
New Member
6 0 0

Thank you. 

I just added this and noticed that it only adds the reviews to the first 3 rows of products. Then the rest of the rows show no reviews. Perhaps something witht he endless scroll setting?

Also, is there a way to get the text "5 reviews" after the stars to not show up?

 

0 Likes
Java-the-Hut
New Member
2 0 0

im also looking for this answer

0 Likes
Java-the-Hut
New Member
2 0 0

im able to display the review stars & the review count with the review-badge. Im also able to display the review count alone by parsing the metafields with this, 

{% if product.metafields.spr.reviews %}

{% capture review_data %}{{ product.metafields.spr.reviews }}{% endcapture %}

{% if review_data contains '"votes"' %}
{% assign keyword = '"votes"' %}
{% else %}
{% assign keyword = '"reviewCount"' %}
{% endif %}

{% assign rd_a1 = review_data | split: keyword %}
{% assign rd_a2 = rd_a1[1] | split: "=" %}
{% assign rd_a3 = rd_a2[1] | split: '"' %}
{% assign product__reviews-count = rd_a3[1] | plus: 1 | minus: 1 %}

{% endif %}

But im yet to find a way to display only the stars. Or a way to remove the review count from the badge. hmmm


0 Likes
Innershop
New Member
7 0 0

Did anyone manage to remove the number of reviews next to the stars? I'd love to have only the stars or at least remove the word reviews next to the numbers in the product page badge...

0 Likes