Integrations / Shopify

Shopify Markets indexing

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.

Shopify Markets helps merchants sell around the world with multiple languages, international pricing, or market-specific domains.

The Algolia AI Search & Discovery app creates one index for each market and language. This lets you tailor ranking settings for each language and is compatible with existing Algolia features.

Before you begin: update Shopify theme assets

To support Shopify Markets indexing, update your Algolia theme assets to the latest version.

  1. In your Shopify admin, go to the Algolia AI Search & Discovery app.
  2. Go to the Search options tab.
  3. Click Enable on new theme and either install the theme assets to your existing theme, or install a new theme.

    Before updating your existing theme, make a backup. Updating will reset any customization you’ve made to your Algolia theme assets.

    Enable Algolia theme assets in Shopify

Enable markets indexing

  1. To enable markets settings on your store’s Algolia application, contact the Algolia support team and provide them with your Shopify domain and Algolia application ID.

  2. After activation, go to the Indexing tab in the Algolia AI Search & Discovery app.

  3. Select Enable Markets Indexing.

    Checkbox displayed to enable markets indexing

    A list shows your store’s active Shopify Markets and their available languages.

  4. For each market/language combination you want to index, check the option in the Sync to Algolia column.

    UI of markets indexing after being enabled

    Each selected market/language combination creates a new index. Only select the combinations you actually need, since the processing time and number of records increases with each new index. Don’t select more than 10 markets.

  5. Click Save.

Reindexing

First, Algolia prepares for real-time indexing in the background. This might take up to one minute.

Next, Algolia reindexes your products and collections with new indices, replicas, and extra metafields for each record, such as, multiple currencies.

Algolia dashboard index list after markets indexing is enabled

After the initial re-indexing, real-time indexing keeps your products up-to-date with changes from each market.

Configure your Shopify storefront

Update your search experience to support translation.

Autocomplete dynamic selector helper

  1. In the Search options tab, go to the Search basics section.
  2. In the Autocomplete section, click Customize.
  3. Select Use default dynamic selector. This helps the Algolia autocomplete menu to connect to the correct search form URL when users change to a different language or market in your store.

Dynamic selector helper checkbox for multi-language support with autocomplete widget

Widget text translations

You can translate text from your Shopify templates with Shopify’s Translate and Adapt app. The translatable text from Algolia includes labels, placeholders, and helper text.

To edit the translations:

  1. Open the Translate and Adapt app.
  2. Select Store metadata.

    Guide to access store metafields translations

  3. Add your translation to these metafields:

    • algolia_search.translations—translations for labels and placeholder text
    • algolia_search.facets—translations for facet filters
    • algolia_search.sort_orders—translations for different sort orders

    UI of JSON fields to translate Algolia widget text for markets support

Schema

If you added translations for product attributes in Shopify, they’re added to each record. Otherwise, the record defaults to your store’s primary language.

The currency for each record defaults to your store’s primary currency. Additional currencies are added as separate objects, such as, market_pricing_eur.

The following example shows the changed fields of a record after enabling Markets indexing:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  // ...variant record data
  "title": "Product Title", // Translation applied || default title
  "variant_title": "option1 / option2 / option 3", // Translation applied || default variant title
  "description": "Product description", // Translation applied || default description
  "handle": "product-handle", // Translation applied || default handle
  "price": 100, // Price in primary currency
  "compare_at_price": 150, // Price in primary currency
  "variant_min_price": 100, // Price in primary currency
  "variant_max_price": 150, // Price in primary currency
  "variant_min_compare_at_price": 150, // Price in primary currency
  "variant_max_compare_at_price": 200, // Price in primary currency
  "market_pricing_eur": {
    "price": 90, // Price in EUR
    "compare_at_price": 135, // Price in EUR
    "variant_min_price": 90, // Price in EUR
    "variant_max_price": 135, // Price in EUR
    "variant_min_compare_at_price": 135, // Price in EUR
    "variant_max_compare_at_price": 180 // Price in EUR
  },
  "market_pricing_gbp": {
    "price": 80, // Price in GBP
    "compare_at_price": 120, // Price in GBP
    "variant_min_price": 80, // Price in GBP
    "variant_max_price": 120, // Price in GBP
    "variant_min_compare_at_price": 120, // Price in GBP
    "variant_max_compare_at_price": 160 // Price in GBP
  }
}
Did you find this page helpful?