MJHost Posted July 19, 2019 Share Posted July 19, 2019 Hey all, I am attempting to add a script to the ticket confirmation screen. But it doesn't show on the confirmation page, and also the activity log, is showing a Syntax error. Can anyone advise what I have done wrong? This is the script: Smarty Error: Syntax error in template "MY-DIRECTORY-LINK-HERE" on line 31 "<script>(function(d, s, id) {var fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) return;js = d.createElement(s);js.id = id;js.async=true;js.src = "https://hostadvice.com/embed/widgets.js";fjs.parentNode.insertBefore(js, fjs);}(document, "script", "ha-embed"));</script>" unknown tag 'var' 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted July 19, 2019 Share Posted July 19, 2019 You need to encase javascript with {literal} tags as smarty uses curly brackets for its use. As for the confirmation page, more information is needed on how you put it in there? via hook, template change, etc. 1 Quote Link to comment Share on other sites More sharing options...
MJHost Posted July 20, 2019 Author Share Posted July 20, 2019 23 hours ago, steven99 said: You need to encase javascript with {literal} tags as smarty uses curly brackets for its use. As for the confirmation page, more information is needed on how you put it in there? via hook, template change, etc. Thank you @steven99 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.