WorldOfNuts Posted May 12, 2016 Share Posted May 12, 2016 (edited) Hi I have a cloud solution and after i have got a user on getsitecontrol.com, i have to add a script code, just before the </body> tag, but every time i do that i get a blank frontpage, its like the site can´t be loaded. the script is: <script> (function (w,i,d,g,e,t,s) {w[d] = w[d]||[];t= i.createElement(g); t.async=1;t.src=e;s=i.getElementsByTagName(g)[0];s.parentNode.insertBefore(t, s); })(window, document, '_gscq','script','//widgets.getsitecontrol.com/43596/script.js');</script> can anyone help me? what should i do to get it to work? Edited May 12, 2016 by WorldOfNuts (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted May 12, 2016 Share Posted May 12, 2016 Did you try removing the option to move javascript to the bottom in Advanced Parameters->Performance? Link to comment Share on other sites More sharing options...
WorldOfNuts Posted May 12, 2016 Author Share Posted May 12, 2016 Hi i have just tried that, but that didnt help either. when i add it to the footer.tpl file under this path: /themes/default-bootstrap i just gets a blank site on the front. Link to comment Share on other sites More sharing options...
musicmaster Posted May 12, 2016 Share Posted May 12, 2016 A blank screen points to a php or Smarty error. So you should switch development mode on to see what goes wrong. You can also look in the php error log of your server. Link to comment Share on other sites More sharing options...
WorldOfNuts Posted May 13, 2016 Author Share Posted May 13, 2016 I´m using the presta cloud solution. could it be there the problem is? Link to comment Share on other sites More sharing options...
musicmaster Posted May 13, 2016 Share Posted May 13, 2016 I have no experience with PS cloud. Maybe someone else... Link to comment Share on other sites More sharing options...
El Patron Posted May 14, 2016 Share Posted May 14, 2016 enable errors https://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information-blank-page-500-internal-server-error/ Link to comment Share on other sites More sharing options...
WorldOfNuts Posted May 14, 2016 Author Share Posted May 14, 2016 This is solved. the problem was that i edited the tpl file and thats not allowed on a cloud solution. Link to comment Share on other sites More sharing options...
vekia Posted May 14, 2016 Share Posted May 14, 2016 This is solved. the problem was that i edited the tpl file and thats not allowed on a cloud solution. what? it is possible to edit .tpl files on cloud. problem you had was related probably to fact that you used braces, and smarty treats code with braces as a smarty syntax to avoid that use {literal} {/literal} tags, put the code with braces inside. {literal} <script> (function (w,i,d,g,e,t,s) {w[d] = w[d]||[];t= i.createElement(g); t.async=1;t.src=e;s=i.getElementsByTagName(g)[0];s.parentNode.insertBefore(t, s); })(window, document, '_gscq','script','//widgets.getsitecontrol.com/43596/script.js'); </script> {/literal} Link to comment Share on other sites More sharing options...
Loe- Posted February 11, 2017 Share Posted February 11, 2017 (edited) what? it is possible to edit .tpl files on cloud. problem you had was related probably to fact that you used braces, and smarty treats code with braces as a smarty syntax to avoid that use {literal} {/literal} tags, put the code with braces inside. {literal} <script> (function (w,i,d,g,e,t,s) {w[d] = w[d]||[];t= i.createElement(g); t.async=1;t.src=e;s=i.getElementsByTagName(g)[0];s.parentNode.insertBefore(t, s); })(window, document, '_gscq','script','//widgets.getsitecontrol.com/43596/script.js'); </script> {/literal} Unfortunately, this doesnt helps also.. Inserted it in footer.tpl, right before the </body> tag. Is there anything else i can do? Using PS 1.6.1.8. Edited February 11, 2017 by loetje88 (see edit history) 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