PrestaShop is using the addJquery()
method from the Controller
class which allows you to decides which path/version of Jquery you'd like to include for a specific page. This also allows you to run two versions of jQuery at the same time (by using the noConflict
flag as described here)
The addJquery()
method uses a static method to get jQuery's path: Media::getJqueryPath()
which is itself using the _PS_JQUERY_VERSION_
constant.
Therefore, there are two places where you would need to make changes:
Admin Panel
Defines
File: /config/defines.inc.php
on line 217
in PrestaShop 1.6.1.24
define('_PS_JQUERY_VERSION_', '1.11.0');
However, I would recommend against it due to possible side effects with some jQuery plugins used by PrestaShop (both on the back-end and front-end).
A alternate solution would be to:
- Keep these files as is
- Override the
setMedia()
method in classes/controller/FrontController.php
- Specify the jQuery 3.4.1 version in
$this->addJquery()
(line 952 in PrestaShop 1.6.1.24) - only if you detect that the current controller is ProductControllerCore
I hope this helps!