Product Review on Homepage

Solved
Highlighted
Tourist
4 0 0

Hi 
I'm using Shopify's in built review app Product Review. I'm struggling to find the correct place to past the setup code to have the review under all the content on my homepage and just above the footer, any help will be appreciated.

I'm assuming that its meant to be pasted in index.liquid file but it isn't working so i'm not sure where else to check.

0 Likes
Highlighted
Excursionist
17 2 4

This is an accepted solution.

Hi there!

What theme are you using?

In order to get your reviews on your homepage, you're likely to have to use shopify liquid code to first, pull the products you want to feature, then, you can link {% section 'shopify-reviews' %} to the index file!

Another option would be to create a section for the homepage site using the liquid code and able to move it around your page as any other section.

I can help you out if you would like,

Please email me: hello@jenreiko.co

 

 

Cheers!

1 Like
Highlighted
Tourist
11 0 1

how would you create a section that had the product reviews?

0 Likes
Highlighted
Excursionist
17 2 4
Hi there!

To add a reviews section to your home page, you’ll have to create a new section.
Within the section schema, you also need to provide “presets” in order to add that section to the home page.
Here’s a shopify article  that should be helpful.
If you’re stuck or confused, and would like to hire me to do it for you, I can also do that!


0 Likes
Highlighted
Excursionist
17 2 4

Guess i also didn't really answer your question.

 

After you add the section with presets, the HTML for the section (depending on your theme)

if you're using the products review app by shopify, there's a piece of code that looks like this 

<div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div>

So essentially, you'd have to add to the schema

  • collection chooser 
  • limit of # of products (or if just one product, i can help a different way with that too)
  • presets 

Then, create a {% for products in collection.{whatever you want } %}

{% include some kind of product-grid-item, similar to the code that pulls the products into your collection pages  %}

the first code above ^ can be added to your productt-grid item, so you could show off the reviews or stars below the title and information etc. 

{% endfor %}

0 Likes
Highlighted
Excursionist
17 2 4

Here's the link

0 Likes