Guest Posted March 19, 2015 Share Posted March 19, 2015 Hello, I'm working from the default theme, Prestashop 1.6. Been checking docs and forum searches but I can't find ho to manage the jquery like for example bx slider: <script type="text/javascript" src="/prestashop/js/jquery/plugins/bxslider/jquery.bxslider.js"></script> This is what I would like to see removed. Did I miss a section in the docs how this is done? I could just remove it from the folder but then I'm not sure, maybe some of these are used in backend, too. Thanks for your input. Link to comment Share on other sites More sharing options...
MichałM Posted August 6, 2015 Share Posted August 6, 2015 I've been looking answer for the same issue... and I came up with the idea. 1. Create override file for Controller.php in override/classes/controller/ 2. You have to modify addJqueryPlugin function, for example: public function addJqueryPlugin($name, $folder = null, $css = true) { if (!is_array($name)) $name = array($name); if (is_array($name)) { foreach ($name as $plugin) { if($plugin != 'bxslider') { $plugin_path = Media::getJqueryPluginPath($plugin, $folder); if (!empty($plugin_path['js'])) $this->addJS($plugin_path['js'], false); if ($css && !empty($plugin_path['css'])) $this->addCSS(key($plugin_path['css']), 'all', null, false); } } } } 3. As you can see, I added after foreach: "if($plugin != 'bxslider')" and checked if module name isn't bxslider. 2 Link to comment Share on other sites More sharing options...
Scott J Posted January 18, 2016 Share Posted January 18, 2016 Yes indeed, when you uninstall/delete a module, you don't expect its resources to keep loading! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now