botmanov Posted August 17, 2011 Share Posted August 17, 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...
Prescol Posted August 26, 2011 Share Posted August 26, 2011 This can work, but better if you use smarty code for get your shop themes dir. Link to comment Share on other sites More sharing options...
Rohidas Sanap Posted January 19, 2012 Share Posted January 19, 2012 No that can not work by this way, there is something that is to be modified... Link to comment Share on other sites More sharing options...
dhada Posted February 16, 2012 Share Posted February 16, 2012 <script type="text/javascript" src="{$js_dir}mod.js"></script> this one will work upload your javascript file in js directory folder themes/themename/js/ then insert the script below {$HOOK_HEADER} 2 Link to comment Share on other sites More sharing options...
Sokete Posted May 21, 2013 Share Posted May 21, 2013 <script type="text/javascript" src="{$js_dir}mod.js"></script> this one will work upload your javascript file in js directory folder themes/themename/js/ then insert the script below {$HOOK_HEADER} Best option , THANKS 1 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