Tom1369 Posted November 26, 2020 Share Posted November 26, 2020 Prestashop 1.7.6.2 Hello I want use Select2 in backoffice from prestashop. I think that select2 need jQuery so I add too. But jQuery is not added and select2 not working. public function hookActionAdminControllerSetMedia() { $this->context->controller->addJquery(); $this->context->controller->addJQueryPlugin('select2'); $this->context->controller->addCSS($this->_path . 'views/css/' . $this->name . '.css', 'all'); } Link to comment Share on other sites More sharing options...
Tom1369 Posted November 27, 2020 Author Share Posted November 27, 2020 This was removed in version 1.7.6.2 $this->context->controller->addJquery(); So I use external select2 not from prestashop and its works. $this->context->controller->addJS(_PS_BO_ALL_THEMES_DIR_ . 'default/js/select2.min.js'); 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