Requirements
Active REVIEWS.io account
Active Searchanise account
Navigation
Log in to REVIEWS.io
Navigate to Integrations
Select Searchanise
Instructions
Step 1: Add Searchanise to Shopify
If not already done, install Searchanise using the link on their website.
Step 2: Edit Theme
Once you have installed the app, you need to add our Searchanise Optimised Rating Snippet code to your site. To do this, go to 'Themes' in your Shopify dashboard, click 'Actions' under your Current Theme, and then 'Edit Code'.
Step 3: Add Code
When in the Shopify Code Editor, search for "theme.liquid" and open it.
From here, you need to paste the following code to the bottom of the theme.liquid file:
<script>
$(document).on('Searchanise.ResultsUpdated Searchanise.AutocompleteUpdated', function(event, container) {
$(".snize-product[id]").each(function(item) {
var searchaniseItem = $(this);
if(!searchaniseItem.find('.ruk_rating_snippet').length) {
if (searchaniseItem.find("a.snize-item").length) {
prodJsonUrl = searchaniseItem.find("a.snize-item").attr("href").split('?')[0] + '.json';
} else {
prodJsonUrl = searchaniseItem.find("a.snize-view-link").attr("href").split('?')[0] + '.json';
}
$.get(prodJsonUrl, function(data) {
ratingSnipSku = data.product.handle + ';';
if (data.product.variants) {
$(data.product.variants).each(function(variant) {
ratingSnipSku += (this.sku + ';' + this.id + ';');
});
}
searchaniseItem.find(".snize-title").after(`<div class='ruk_rating_snippet' data-sku='` + ratingSnipSku + `'></div>`);
});
}
});
setTimeout(function() {
ratingSnippet("ruk_rating_snippet", {
store: "ilovelinen.com.au2",
color: "#10D577",
linebreak: true,
text: "Reviews"
});
}, 300);
});
</script>
Please Note: This code requires Rating Snippets to already be installed, along with jQuery, to work.That's it! Rating Snippets will now show on Searchanise Auto Complete and Results Pages.