ben22 Posted February 8, 2010 Share Posted February 8, 2010 Hi all,New on prestashop, i try to add some javascript code in the footer.Ex: uservoice widgetI past javscript into the footer.ftl.But then the footer is no more display on the shop.Any suggestion ??regards. Link to comment Share on other sites More sharing options...
NassimBojji Posted July 4, 2011 Share Posted July 4, 2011 Hi ben22,I have the same problem, I would like to add Uservoice to my Website. Did you found solution ? ThxBest regards Link to comment Share on other sites More sharing options...
shokinro Posted July 6, 2011 Share Posted July 6, 2011 I don't know which file you added your javascript.if you add the javascript directly to theme file (footer.tpl), then it could be because of "{" and "}"because the theme file will be compile by smarty and that's the problem.I suggest you write the JS in a seperated files and use the file link.or please embrace your javascript with {literal}You JS code here{/literal} Link to comment Share on other sites More sharing options...
NassimBojji Posted July 6, 2011 Share Posted July 6, 2011 Hi shokinroThank you very much for your reply. Could you tell me what line of the file footer.tlp I add the JavaScript code UserVoice? The code looks like this! {[removed] (function() { var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true; uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/myID_API.js'; var s = document.getElementsByTagName('script')[0]; s[removed].insertBefore(uv, s); })(); [removed]} Thank you Link to comment Share on other sites More sharing options...
NassimBojji Posted July 6, 2011 Share Posted July 6, 2011 Thank you for your help, I tested it works perfectly:) I put the JavaScript at the end of the file footer.tpl Link to comment Share on other sites More sharing options...
shokinro Posted July 6, 2011 Share Posted July 6, 2011 good know it worked for you and thanks for feedback. Could you please mark this thread as SOLVED? Link to comment Share on other sites More sharing options...
NassimBojji Posted July 6, 2011 Share Posted July 6, 2011 I click on the "solve" but nothing is displayed. The mention "mark as solved" redirects me on the same page in the forum! I don't know what is the problem?? Link to comment Share on other sites More sharing options...
shokinro Posted July 6, 2011 Share Posted July 6, 2011 Sorry, it seems that you are the the owner of thread. it is my mistake. so just leave it as it is. thanks Link to comment Share on other sites More sharing options...
Recommended Posts