Theme compatibility
Search Pro works with the search box and the results page of your theme. This chapter explains how the search box is detected and what to do when yours is not.
What Search Pro uses from your theme
| Part of the shop | What Search Pro does |
|---|---|
| The search box | When the visitor touches it, the full-screen search opens over the page. The box itself is not changed. |
| The results page | Kept as your theme draws it. Search Pro decides which products appear and in what order. |
| The theme's own live search | When it asks OpenCart for products by name, it gets Search Pro's ranking. |
How the search box is detected
The full-screen search attaches to the search box of OpenCart's default theme and of most themes: any text field whose name is search. This is the rule used when Search box (CSS selector) is empty:
#search input[name='search'], input[name='search']Nothing is added to your theme files. A small loader is placed in the head of each page and waits for the first touch of the search box; only then are the script and the styles of the search loaded.
When your theme's search box is not detected
If you click the search box of your shop and the full-screen search does not open, your theme uses a different field. Tell Search Pro which one:
- Open your shop in a desktop browser, right-click the search box and choose Inspect.
- Look at the highlighted line. Note the
id, theclassor thenameof the field. For example:
<input type="text" name="q" class="header-search-field" placeholder="Search">- Write a CSS selector that matches that field. For the example above, either of these:
input[name='q']input.header-search-field- In the panel, open the Search tab, paste the selector in Search box (CSS selector) and press Save.
- Reload your shop and click the search box.
You can list several selectors separated by commas, for example when the theme has one search box for desktop and another for mobile:
#search input[name='search'], .mobile-search inputColours
The full-screen search has its own design. Use Accent colour in the Search tab to match the links and active filters to your theme.
If you prefer not to use the full-screen search
Switch Full-screen search off in the Search tab. Your theme's search box then works as before, and its results page still gets Search Pro's ranking, spelling correction and synonyms.
Getting help with a theme
If you cannot find the right selector, open a support ticket with the address of your shop and the name of your theme.
Still need help?
Open a support ticket from your account and our team will look at your store with you.