Skip to content
Documentation sections
English
Integrations

How to add smart search to Shopware

Connect Indexa to Shopware 6 through a global code field or a custom Storefront theme extension.

Prepare the catalog and code

  1. Connect your product feed in Indexa and wait for the catalog to load.

  2. In “Widget → Integration”, enter the website URL and copy the universal code.

Add the search code to Shopware

  1. Use your theme's global head-code field if it provides one.

  2. Otherwise, ask your maintainer to add the script through Resources/views/storefront/layout/meta.html.twig in your custom theme.

  3. Replace the example script with your complete Indexa code and keep {{ parent() }} so the standard head content is retained.

  4. Apply the theme changes, compile the theme and clear the cache as required by your setup.

Example for a Storefront theme

Example for a Storefront theme
{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}

{% block layout_head_javascript_tracking %}
  {{ parent() }}
  <script async src="INDEXA_LOADER_URL_FROM_DASHBOARD"></script>
{% endblock %}
Twig / HTML

Check search after installation

Open your store, then use “Check installation” in Indexa. Select the desktop and mobile search elements and save.

Search for a product, follow its link and close the widget. Repeat on the home, category and product pages.

Shopware Cloud and headless storefronts may use a different process. Use an available global field or ask your site maintainer.

Still have questions? Contact us — We will help you set it up.

Esc — close