[PrestaShop] Theme Provider + jQuery

PrestaShop Modules including WordPress & phpBB Integration.
Akrolab
Posts: 2
Joined: Mon Jul 03, 2017 6:36 am

[PrestaShop] Theme Provider + jQuery

Postby Akrolab » Mon Jul 03, 2017 6:42 am

Hello,

I use your module with many websites, I have only one issue :
As soon as I activate the option to put the javascript in the footer in Prestashop every jQuery widget or plugin used in the wordpress site stop working.

Do you have a solution to this ?

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [PrestaShop] Theme Provider + jQuery

Postby inveo » Mon Jul 03, 2017 6:47 am

This is a jquery issue - the jQuery that comes with PS needs to be loaded before the WP. Unless you are developer we recommend to leave the "Move to footer" option in PS disabled.

Akrolab
Posts: 2
Joined: Mon Jul 03, 2017 6:36 am

Re: [PrestaShop] Theme Provider + jQuery

Postby Akrolab » Mon Jul 03, 2017 6:52 am

I am a Developper, this is not really a jQuery issue.
As you know loading the javascript at the end of a page increase the performance of a website and can be very useful if the pages you load are “big”.

That being said I would like a solution so that I can load my JS at the bottom at least for the Prestashop part of my website.

This can make me gain a few seconds of loading time which are very important for an e-shop.

inveo
Inveo Support
Posts: 1285
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [PrestaShop] Theme Provider + jQuery

Postby inveo » Mon Jul 03, 2017 7:04 am

In fact unless referenced JS files are referenced with "async" or "defer" attribute, moving these files to the footer do not make any difference - they pause/stop the parser regardless on position until they are loaded. If you are a developer then I wold suggest to take a look at the Dev console of the browser to see the error message.