How to add smart search to OpenCart
Add Indexa search to your OpenCart theme header so it is available throughout your store.
Prepare the catalog and code
Connect your product feed in Indexa and wait for the catalog to load.
In “Widget → Integration”, enter the website URL and copy the universal code.
Through the theme editor
Open “Design → Theme Editor”, if your store provides this editor.
Select the store, active theme and common/header template. Back up the original code.
Add the complete Indexa script before the closing </head> tag.
Save the changes, enable any required template override and clear the theme cache.
If you edit theme files
In OpenCart 3, the header is commonly at catalog/view/theme/THEME_NAME/template/common/header.twig; in OpenCart 4, at catalog/view/template/common/header.twig. Theme extensions can use other paths.
Use a global head-code field provided by your theme, or ask your site maintainer to add the script to the correct header template.
Example for header.twig
Add the script to the existing template. Do not replace the complete header with this fragment.
<head>
<!-- Existing store header code -->
<script async src="INDEXA_LOADER_URL_FROM_DASHBOARD"></script>
</head>
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.
For multiple stores, select the correct store and check search on its domain after installation.