Instantsearch.js - display Shopify products, instead of variant

Hello,

I’m trying to display Shopify products instead of Variants, but can’t figure out how to do it with the instantsearch.js library.

Any tips? I’ve read a little in the docs about grouping and distinct, but can’t get it to work with my code.

Here is my code (with the widgets removed):

const search = instantsearch({
  searchClient: algoliasearch('G91R9ZYROU', 'c62b928683730eb1c8165b59825c8968'),
  indexName: 'shopify_products'
});

# Widgets here...

search.start();

Hi Chris!

I’m Olivier, part of the engineering team of Algolia’s Shopify app.

There’s an option called “Show products instead of variants” in the Algolia part of your admin dashboard in Shopify which is working with the JS provided (the one you install in your theme). Did you tried it and had you issues with it?

If you decided to create a custom frontend implementation, using distinct and attributeForDistinct: 'id' is the way to go.

Best regards,