Adding product review badge under product thumbnail (Supply theme)

New Member
3 0 0

I cannot get star ratings badge in my product listings under product thumbnails to work. Yes, I did follow the apps instructions to modify the product-grid-item.liquid file, but I guess I'm missing something. Heres the code for my file right now:

{% unless grid_item_width %}
  {% assign grid_item_width = 'large--one-quarter medium-down--one-half' %}
{% endunless %}

{% unless current_collection %}
  {% assign current_collection = collection %}
{% endunless %}

{% assign on_sale = false %}
{% if product.compare_at_price > product.price %}
  {% assign on_sale = true %}
{% endif %}

{% assign sold_out = true %}
{% if product.available  %}
  {% assign sold_out = false %}
{% endif %}

{% comment %}
  Select the product image size from settings.
{% endcomment %}
{% assign image_size = settings.collection_prod_image_sizes %}

<div class="grid-item {{ grid_item_width }}{% if sold_out %} sold-out{% endif %}{% if on_sale %} on-sale{% endif %}">

  <a href="{{ product.url | within: current_collection }}" class="product-grid-item">
    <div class="product-grid-image">
      <div class="product-grid-image--centered">
        {% if sold_out %}
          <div class="badge badge--sold-out"><span class="badge-label">{{ 'products.product.sold_out' | t }}</span></div>
        {% endif %}
        <img src="{{ product.featured_image.src | img_url: image_size }}" alt="{{ product.featured_image.alt | escape }}">
      </div>
    </div>

    <p>{{ product.title }}</p>
    
    <div class="product-item--price">
      <span class="h1 medium--left">
        {% include 'price' with product.price %}
        {% if on_sale and settings.product_show_compare_at_price %}
          <small><s>{% include 'price' with product.compare_at_price %}</s></small>
        {% endif %}
      </span>
      {% if on_sale and settings.product_show_saved_amount %}
        <span class="sale-tag{% unless settings.product_show_compare_at_price %} medium--right{% endunless %}{% if settings.product_reviews_enable %} has-reviews{% endif %}">
          {% assign compare_price = product.compare_at_price %}
          {% assign product_price = product.price %}
          {% include 'price-sale' %}
        </span>
      {% endif %}
    </div>

    {% if settings.product_reviews_enable %} 
      <span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>
    {% endif %}
  </a>

</div>
 

This is my file after I just installed the shopify review app. I tried pasting  <span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>  under  <div class="product-item--price">, but it did not work. I want the star ratings under the product price.   

Any help is appreciated! 
 

 

0 Likes
Shopify Staff
Shopify Staff
83 0 9

Hey!

I just tested this out on my own store using the Supply theme and it seems like there are some weird issues with the star badges on that theme! They only show up on the collection page after a review has been left, which typically isn't how those badges work.

I spoke with our themes team on the issue and they wanted to take a further look into things, so if you could write into our Support we can send the issue in to be checked out :)
https://support.shopify.com/

Thank you! :)

- Bailey

0 Likes
New Member
3 0 0

Thanks for the help, glad to know I wasn't at fault. Forwarded a ticket to support. 

0 Likes
Shopify Partner
1 0 0

Any updates on the "How to show reviews on collection page" with 

<div class="ryviu-collection-widget" data-ryviu-widget="{{ product.handle }},{{ shop.secure_url }}"></div> ?

I am using Supply Theme, have no luck on showing review on collection page.

Urgent , Please help

 

 

0 Likes
New Member
1 0 0

Hi, 

 

Is there a way to modify the html that is build by the shopify product reviews class...... shopify-product-reviews-badge.

The reason i ask, is currently we see "2 reviews" when using the badge, but it looks bad so we want to change the class to instead display simply the number of reviews as follows "(2)"

 

Thanks in advance. 

 

Hernando

0 Likes