In this section you will learn how to modify the product template to include Shopify reviews. We'll take you through the steps to access some custom review code, and show you how to add it to your theme. Note that this tutorial requires getting into the code section of your theme. Before you begin, make sure you have the Shopify Product reviews app installed.
1. Create a duplicate of your existing theme
Before we start editing code, it's always a good idea to create a backup of your theme in case anything goes wrong. From your themes panel (accessed by clicking Online Store from the Shopify admin), click the "Actions" button next to your installation of the Loft theme. Next, select "Duplicate."
This will create a new copy of your theme, which we'll be editing.
2. Open the code editor
On the theme you just created (it will have the same name as the theme you duplicated it from, but with have the words "Copy of" in front of it), click "Actions" dropdown and then select "Edit code." Once you do this, the Shopify code editor will open.
3. Navigate to the correct code snippet
On the left side of the screen you'll see a sidebar - this sidebar lists all of the theme's files. Scroll down to "Sections" and then click "product-brand-features.liquid" (see screenshot).
Once you've done that, right click inside the code editor, hit "select all" and then delete the highlighted text (but don't hit save.... yet!).
4. Grab new code from our repository
- Go to this link, and select all the text from it, right click and select "copy"
- Back inside the code editor, right click and paste that code into the editor. You may now hit save.
5. Activate the product reviews block
Once the above code is added and you've saved your work, click the "Customize theme" link in the upper left corner (directly under the title of the theme). Next:
- This loads the theme customization panel (the Theme editor). From the preview version of your site, which should appear on the right side of your screen, navigate to one of your products.
- Once the product page loads, you should see sections on the left side. Click "Additional details"
- Next click "Add content"
- Select "Shopify reviews"
- You may now re-arrange the Shopify reviews block amongst the other blocks on your product page (product features, related items).
If you get stuck, don't hesitate to reach out.