Shopware 6

How to use jQuery in Shopware 6.5?

Icon NetzkollektivBy Dominik Krebs, Managing Director, CTO

With Shopware 6.5, jQuery was removed from the core code. Existing JavaScript code based on jQuery will no longer work after the update to 6.5.

What is jQuery?

jQuery is a library that has enabled developers to write JavaScript code in a relatively simple way. Over time, this has resulted in smaller functionalities and even entire configurators and applications.

Why was jQuery removed from Shopware 6.5?

jQuery was removed from Shopware 6.5 because JavaScript has evolved and the compatibility of JavaScript across browsers has improved over time – so it became obsolete. Since the end of Internet Explorer, jQuery is practically no longer needed. You can still use it and do nothing wrong with it. However, practically everything that used to be very easy to do with jQuery is now just as easy to do with JavaScript. There are easy-to-use native alternatives for every functionality. The web is now full of pages such as You might not need jQuery, which describe ways of implementing things with VanillaJS, i.e. normal JavaScript. So why use another library that means additional transfer volume to do things that can also be done this way? Exactly, VanillaJS!

How can I continue to use my existing code with jQuery?

It doesn’t help: if the code is not to be rewritten, jQuery must first be reinstalled.

To add jQuery back to Shopware 6, Shopware provides detailed instructions in the Upgrade Notes: Still need jQuery? This describes how to add jQuery back to the theme and thus restore the compatibility of old scripts.

If you can’t or don’t want to customise your own theme, you can use our free jQuery Support for Shopware >= 6.5 extension, which is easy to install and implements the instructions described above.

Shopware 6 Agentur gesucht?

Sie sind auf der Suche nach einer zuverlässigen Agentur, die sich mit Shopware 6 auskennt und Ihnen unkompliziert durch den Online-Shop Alltag hilft? NETZKOLLEKTIV betreut Händler seit über 10 Jahren. Rufen Sie uns an!

Jetzt unverbindlich über mein Projekt sprechen