Jump to content

Configure the administrator part of the module (JS, CSS, IMG)


nicetimes

Recommended Posts

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

<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 by nicetimes (see edit history)
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...