Add ratings from Shopify Reviews to collection pages | Debut Theme

Highlighted
Tourist
8 0 2

Hey guys, 

Please can you let me know if it's possible to add the Shopify Reviews (badge) to collection pages on the debut theme? 

https://ecommerce.shopify.com/c/shopify-discussion/t/add-reviews-stars-to-collection-templates-32356... mentions how to add it, but I'm not sure which .liquid file I should be looking at on debut theme. 

Thanks, 

Andy

Thanks, Andy
1 Like
Highlighted
Shopify Staff
Shopify Staff
45 0 6

Hey, !

Ciara here from Shopify. Thanks for posting. :)

So the info that you need is to be found in this doc here.

And vis a vis your theme, it's likely that you will want to experiment with different placements here.

Word to the wise, you won't see the app on collection pages until you've received your first review.

Do feel free to keep the thread going here to let me know how you get on!

I hope this helps! ?

Ciara G | Shopify
support@shopify.com

0 Likes
Highlighted
Tourist
8 0 2

Hi Ciara, 

Thanks, I've managed to amend the code in the product-card-grid.liquid to the following: 

{% unless grid_image_width %}
  {%- assign grid_image_width = '300x300' -%}
{% endunless %}
{%- assign grid_image_scale = '2' -%}

<div class="grid-view-item{% unless product.available %} product-price--sold-out grid-view-item--sold-out{% endunless %}">
  <a class="grid-view-item__link" href="{{ product.url | within: collection }}">
    <img class="grid-view-item__image" src="{{ product.featured_image.src | img_url: grid_image_width, scale: grid_image_scale }}" alt="{{ product.featured_image.alt }}">
    <div class="h4 grid-view-item__title">{{ product.title }}</div>
    {% if section.settings.show_vendor %}
      <div class="grid-view-item__vendor">{{ product.vendor }}</div>
    {% endif %}
    <div class="grid-view-item__meta">
      {% include 'product-price' %}
    </div>
    <span class="shopify-product-reviews-badge" data-id="{{ product.id }}">
    </span>

  </a>
</div>
 

It seems to work correctly, as per my collection pages. 

Do you know if there is a way to prevent items with no reviews showing the review badge? 

Thanks, Andy
1 Like
Highlighted
New Member
10 0 0

Hello! This worked for me. Thank you! Are you aware of what code to use for Debut theme to get rid of the "1 review, 2 review"? I'd like it to just have the stars on the collection page, not the number of reviews. Thanks! 

0 Likes
Highlighted
Shopify Partner
1435 194 488

Just saw the thread and for anyone wondering how to hide reviews on products without reviews, you can use this css:

span[data-rating="0.0"] {
    display: none;
}
If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
Highlighted
New Member
10 0 0
Hi! I was actually wondering how to remove the words “1 review” and keep
just the stars on the collection page?
0 Likes
Highlighted
New Member
10 0 0

Where exactly can I add this?

0 Likes