nicetimes Posted April 2, 2014 Share Posted April 2, 2014 Where and how do I add 'JS' and 'CSS' and 'IMG' files to configure the administrator part of the module? Link to comment Share on other sites More sharing options...
El Patron Posted April 2, 2014 Share Posted April 2, 2014 for .js (to help avoid conflicts) I only load when module called (also .css), i.e. at module execute...this may not work for you but here is what I do $this->_html .= '<script type="text/javascript" src="'._MODULE_DIR_.$this->name.'/somejsfile.js"></script> <link type="text/css" rel="stylesheet" href="'._MODULE_DIR_.$this->name.'/somecssfile.css" />'; as for images, mymoudlefolder/img/someimage.png $this->_path.'img/someimage.png of course the above can differ depending on your moudle design. Link to comment Share on other sites More sharing options...
nicetimes Posted April 2, 2014 Author Share Posted April 2, 2014 what part of the file add this code? Link to comment Share on other sites More sharing options...
nicetimes Posted April 2, 2014 Author Share Posted April 2, 2014 it work good, thank you 1 Link to comment Share on other sites More sharing options...
El Patron Posted April 2, 2014 Share Posted April 2, 2014 what part of the file add this code? for .js/.css when you output the screen.. probably best advice is to use code search to find back office admin add .js, this is probably better advice than what I gave above Link to comment Share on other sites More sharing options...
nicetimes Posted April 2, 2014 Author Share Posted April 2, 2014 (edited) <legend>Custom colors:</legend> <p><label for="color_picker_1">'.$this->l('Color').':</label> <input id="colorpickerCelect" name="color_picker_1" type="text" size="40" value="'.Configuration::get('color_picker_1').'"> <div id="colorSelector"><div style="background-color: #0000ff"></div></div> </fieldset> I make style change. can you know how to add a checkbox with saved position? Edited April 2, 2014 by nicetimes (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted April 2, 2014 Share Posted April 2, 2014 uhm, probably do know but I think using a good code editor you should search and see how native PrestaShop manages check boxes. all my new modules will start using helper class, and is new PrestaShop 'best practice', so this might be a good time for you to use (learn) as well. learn more here: http://doc.prestashop.com/display/PS15/Helpers Link to comment Share on other sites More sharing options...
nicetimes Posted April 2, 2014 Author Share Posted April 2, 2014 thank you very very much 1 Link to comment Share on other sites More sharing options...
El Patron Posted April 2, 2014 Share Posted April 2, 2014 thank you very very much you are most welcome,I think once learned the helper is the way to go, it can be a real sturggle building screens otherwise. happy developing 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