Integrations / Shopify

InstantSearch results page

Since December 31, 2023, apps can’t modify the code of Shopify themes. For more information, see The Asset API resource in the Shopify documentation. As an alternative, the Algolia AI Search and Discovery app comes with Shopify App Embed and App Blocks to integrate Autocomplete and InstantSearch. To get started, see Quickstart and Algolia configuration.

Algolia AI Search & Discovery includes a search results page powered by InstantSearch. It replaces your default Shopify search results page and comes with several InstantSearch widgets.

InstantSearch results page with widgets for filtering by price range or vendor and products displayed as cards

Enable the InstantSearch results page

To enable the InstantSearch results page:

  1. Enable Algolia Search App Embed in your theme settings.
  2. Enable Algolia App Blocks.

Configuration

To configure the InstantSearch page, go to the Search options tab in your Shopify app.

InstantSearch configuration screen in the Shopify admin

No results

To tailor the message displayed when a search yields no results, use the templates.empty option provided by the InstantSearch hits widget. This lets you define custom HTML or text to inform users appropriately.

For more detailed information, see Customize an InstantSearch widget.

Advanced customization

Use custom hooks for advanced customization.

Facet display

Algolia AI Search & Discovery supports facet display to manage facet ordering from the Algolia dashboard.

Enable the facet display beta feature

Facet display is available as a beta feature in the Algolia AI Search & Discovery app, as defined in the Algolia Terms of Service (“Beta Services”). If you need access, contact the Algolia support team.

To enable it, select the checkbox in your Shopify admin and click Save.

Facet display checkbox in the Shopify admin

This activates facet display and maps your collection facet rules to your Algolia indices.

Facet display rules

Enabling facet display creates two types of rules:

  • Search page rules
  • Collection page rules

Search page rules

Search page rules use the shopify_default_collection context and apply to collection pages that aren’t customized.

Search page rule in the Algolia dashboard

To change facet display for search pages, edit the feature in the Algolia dashboard. For example:

Facet display setting in the Algolia dashboard

Collection page rules

Collection page rules are triggered by the collection’s handle and its ID.

Collection page rule in the Algolia index

To change these rules, edit them in the Algolia dashboard.

Facet display rule in the Algolia dashboard

If you deactivate the feature, Algolia removes the rules from your dashboard but retains them in your Shopify admin for future reactivation.

Did you find this page helpful?