Klevu is pleased to announce the latest version of our JavaScript Theme, powered by Klevu JS Library, is now available as part of our official Magento extension.
If you’re performing a new installation of the Klevu extension onto a Magento instance, chances are it’s already enabled by default. Navigate to Magento Admin > Stores > Configuration > Klevu Search > Developer Settings where you will find the following setting:
If the selection here is “JSv2” then you are already using our latest theme. If it is “JSv1” then you are still using the legacy theme. If you’re already up and running with Klevu with everything looking how you expect, you should not change this value. However, if you are starting a new project and would like more control over your Klevu theme, you may wish to give the latest theme a try.
Any customisations made in JSv1 or JSv2 are not transferrable, so you would need to redevelop any changes for the respective theme. Therefore please use this setting with caution.
All you need to do is:
- Change this value to either JSv1 or JSv2 as required for the current store.
- Select Klevu JS Theme for Search (and Category pages if applicable).
- Flush your cache.
The Klevu extension will take care of the rest and serve quick search, search results page, and category pages with the theme you selected.
FAQs
While the new theme is both stable and an improvement on the legacy version, existing installations will not switch to the new theme automatically to prevent any unexpected side effects. If you have previously installed the module at version 2.4.x or lower (even if you have subsequently removed it), you will remain on the legacy theme until you explicitly change the setting in your Magento admin panel.
This applies even if you have not yet connected your store with the Klevu service.
- Log into your Magento admin panel and navigate to Stores > Settings > Configuration > Klevu > Search Configuration > Developer Settings
- Change the field Theme Version to the desired value
- Save the configuration
- Clear your Magento cache
Note, new store registrations will use the value set in Magento at time of sign-up. This also applies to additional stores in a multisite where the theme version value has been changed prior to integrating Klevu.
This would be a good way to trial the new JS Library before rolling out to established sites, or if you have sites using different Magento themes.
If you want to do this, you will need to implement the functionality yourself through a custom extension, however it is not recommended as it may cause conflicts.
While some changes can be performed with template and layout changes in your theme itself, some functionality (for example, changing initialisation settings) will not available without plugging into the module’s code. To help you get started, we also provided one skeleton module which can be used as your starting point for overriding Klevu settings, templates or API Calls. Please download the extension hereand modify as required.
Incorrect Search Box Selector
If you are using a custom theme, you should confirm that the input selector matches your quick search HTML element. The default pattern will match text type inputs with the name “q” (the standard Magento query parameter); ie input type="text" name="q" ... /> so if you have changed the type or name of the search box then you will need to tell the JSv2 initialisation script the new pattern.This value is defined under Stores > Settings > Configuration > Klevu > Search Configuration > Developer Settings > Quicksearch Input Selector and must be a valid JavaScript query selector string.
Too Few Characters Entered
By default the quicksearch should show suggestions on focus, even if the input is empty. This is controlled by the minChars initialisation option (set to 0 by default). You should confirm that this value has not been increased through customisations.
Incorrect Cloud Search V2 URL
Confirm that the Cloud Search V2 URL value under Stores > Settings > Configuration > Klevu > Search Configuration > General Settings corresponds with the existing Cloud Search URL in the same section. Note: you will need to switch to the relevant store scope to see these settingsThe Cloud Search V2 URL should be the same as the Cloud Search URL, only with “v2” at the end of the subdomain. For example
Cloud Search URL: eucs123.ksearchnet.com
Cloud Search V2 URL: eucs123v2.ksearchnet.com
If the Cloud Search V2 URL value does follow this pattern (or is empty), you can delete the value from the field and click Save Config to force the application to regenerate it. Then, clear the cache and the correct value will be populated to the JavaScript initialization configuration on the frontend.
Potential reasons include the following. If you have ruled out all suggestions below, please check in with our community here.
Incorrect Cloud Search V2 URLConfirm that the Cloud Search V2 URL value under Stores > Settings > Configuration > Klevu > Search Configuration > General Settings corresponds with the existing Cloud Search URL in the same section. Note: you will need to switch to the relevant store scope to see these settings
The Cloud Search V2 URL should be the same as the Cloud Search URL, only with “v2” at the end of the subdomain. For example
Cloud Search URL: eucs123.ksearchnet.com
Cloud Search V2 URL: eucs123v2.ksearchnet.com
If the Cloud Search V2 URL value does follow this pattern (or is empty), you can delete the value from the field and click Save Config to force the application to regenerate it. Then, clear the cache and the correct value will be populated to the JavaScript initialization configuration on the frontend.