In this post I am going to explain how to add remote javascript & stylesheet in PrestaShop 1.7.

In PrestaShop 1.7+, it’s easy to register custom assets on each pages. The major improvement is that you can easily manage them from your theme, without any modules.

Lets see how to registering & unregistering javascript as well as stylesheet easily.

Registering in modules

1) In a front controller

2) In a module class

Unregistering

You can unregister assets! That’s the whole point of an id. For example if you want to improve your theme/module’s compatibility with a module, you can unregister its assets and handle them yourself.

Both unregisterJavascript and unregisterStylesheet methods take only one argument: the unique ID of the resource you want to remove..

1) In a front controller

2) In a module class

Thats it!