Skip to main content
Searchanise Integration

How to connect your REVIEWS.IO account to Searchanise

Mollie Herbert avatar
Written by Mollie Herbert
Updated over 4 months ago

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 Optimized 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) {
var prodJsonUrl;

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) {
var 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>

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.

Did this answer your question?