botmanov Posted August 18, 2011 Share Posted August 18, 2011 Hello, I have external javascript file named mod.js. Need to add in header.tpl how i can that? how to AddJS to load a javascript file in the header? put directly this code to header.tpl <script type="text/javascript" src="/themes/prestashop/js/mod.js"></script> or anything else? Link to comment Share on other sites More sharing options...
jeevanoss Posted August 18, 2011 Share Posted August 18, 2011 Add Tools::addJS('your_js_file_path'); in setMedia function in classes/FrontController.php Link to comment Share on other sites More sharing options...
botmanov Posted August 18, 2011 Author Share Posted August 18, 2011 it is correct place? prestashop 1.4.4 Link to comment Share on other sites More sharing options...
botmanov Posted August 20, 2011 Author Share Posted August 20, 2011 up~! it is correct place? prestashop 1.4.4 Link to comment Share on other sites More sharing options...
jeevanoss Posted August 20, 2011 Share Posted August 20, 2011 Yes, correct place Link to comment Share on other sites More sharing options...
botmanov Posted August 21, 2011 Author Share Posted August 21, 2011 thanks, jeevanoss! it's work! 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