Frequently Asked Questions

Will all KMC functionality still work with JSv2, eg. banners and URL redirects?

Please refer to this section of the documentation:

Can I use your demos or examples on a Production store?

The examples we have provided are NOT to be considered “Production-ready”. Their intention is to help developers learn how to implement the most common requirements in search, in order that you can extract the parts you need and implement in your own theme.

By all means use the examples as a starting point, but please thoroughly test and ensure the functionality suits your needs and amend as required. If there are any bugs or issues in the examples that you have used on a Production store, it would be your responsibility to resolve those issues. We would of course welcome the feedback if you have fixed any bugs so that we could update our examples for other customers.

What is the structure for creating a module in Klevu JS Library?

There is no fixed structure of a module, it depends on what the module is intended to do. We have provided various examples of how you might implement some functionality, but the Klevu JavaScript Library is a toolkit to use as you see fit.

Can I use JSv2 for the search overlay, but Magento Preserve Layout for the search results page?

Yes. This would be a very powerful combination on a Magento store where you already have control over the search results landing page, you would now also have full control over the JS, HTML and CSS of the auto-suggest overlay.

I have a new project starting soon, should I use JSv1 or JSv2?

Similar to the answer to why you might move as an existing customer, you should ask yourself how much customisation is expected above and beyond what Klevu JSv1 offers out of the box. If CSS customisation is all that you need, then JSv1 is still a viable option. If you think you might want to move things around, add some custom functionality or change how the search results look then JSv2 should be considered.

Why would I start from scratch with JSv2, when I already have JSv1?

If you are already happy with your search functionality and don’t foresee the need for any further customisation of the look & feel, then there is no need to start over with Klevu JavaScript Library. If you wish to make regular changes and are finding the CSS and customisation options available in JSv1 limiting in any way, then this would be a time to consider moving to Klevu JavaScript Library.

How do I migrate from JSv1 to JSv2?

A move from version 1 of our JavaScript integration to version 2 should be viewed as a new project from scratch. Any existing functionality you currently have in the JS that we host would need to be recreated by your development team using the Klevu JavaScript Library. We have included examples of the most common requirements, and our development team will be happy to assist with the approach for any custom functionality you may have that needs to be migrated.

Will Klevu JSv1 no longer be supported?

Klevu JavaScript Library will not replace JSv1. It provides an alternative integration approach for those with more bespoke requirements for customisation and UI. If our out-of-the-box templates and functionality cover everything you need, by all means stick with our JSv1 approach.

What search layout do I get out of the box with JSv2?

Previously with a JSv1 integration you would get a ready-made template to start with which could be customised via the Klevu Merchant Centre or by our development team to remove or amend the elements you don’t need.

With JSv2 you start with a blank slate. You have full control over which elements of search are relevant to your particular integration, and how they should be implemented.

For example, if your design doesn’t include category suggestions in the auto-suggest overlay, in JSv1 this would have required a customisation to remove them, whereas in JSv2 you simply don’t implement that functionality.

What does Klevu JavaScript Library actually ‘do’?

The Klevu JavaScript Library is a toolkit for building search integrations with Klevu. One analogy is to liken it to jQuery, which on its own does nothing, however it contains numerous tools to assist you in building a JavaScript application.

Klevu JS Library includes functionality that will detect keystrokes across multiple search boxes and automatically begin Chains of functionality to build an API request, send it, process the response and initialise a templating engine to render the response.

By hooking into this library you can build complex search UI’s with a relatively small amount of HTML and JavaScript code.

What platforms are supported by JSv2?

Currently we are focusing our attention on Shopify in order to give greater flexibility to merchants, due to the lack of a Preserve Layout option that is available to our Magento customers.

The Klevu JavaScript Library is based on pure JavaScript and HTML, so is platform agnostic, and our tutorials already include examples for other platforms such as BigCommerce and Magento, but we are yet to complete the onboarding process for those.

What’s the difference between JSv1, JSv2 and Klevu JS Library?

JSv1 is our existing integration where Klevu hosts the JS, HTML and CSS files which are injected into your website to display the search overlay and search results pages. Any changes to the functionality or look & feel must be handled by Klevu, or managed via the customisation options within the Klevu Merchant Centre.

With JSv2 your own development team must build these JS, HTML and CSS files yourself, and host them within your Ecommerce theme. This gives you direct access to make changes to functionality, look & feel as often and freely as you wish.

Klevu JavaScript Library is the formal name for JSv2.