Do you write blog posts for your Shopify store? If you use the built-in blog engine it's really easy to include related product recommendations in your posts. So if you're writing about a product, you might want to show related products that the reader might also be interested in at the end of your post. Here's how.
Write your blog post as usual.
Go to the 'Show HTML' button at the top right of the content-editing box (it looks like this: <>)
- Enter this code, substituting your store's URL and the product code for the item you're writing about
<section class="betterrecs" data-shop="your-shop-url.myshopify.com" data-product_id="your product ID" data-template="product" data-purpose="product" style="overflow: auto; clear: both;"></section>
It will look something like this:
- When you publish the blog you'll see the related products included, something like this
If you want to show the items that the user has recently viewed, simply omit the data product ID and use 'recent' as the template and purpose, like this:
<section class="betterrecs" data-shop="your-shop-url.myshopify.com" data-template="recent" data-purpose="recent" style="overflow: auto; clear: both;"></section>