davurso Posted July 16, 2016 Share Posted July 16, 2016 <div id="as-root"></div><script>(function(e,t,n){var r,i=e.getElementsByTagName(t)[0];if(e.getElementById(n))return;r=e.createElement(t);r.id=n;r.src="//button.aftership.com/all.js";i.parentNode.insertBefore(r,i)})(document,"script","aftership-jssdk")</script><div class="as-track-button" data-size="large" data-domain="track.aftership.com" data-slug="tntpost-it"></div> Link to comment Share on other sites More sharing options...
davurso Posted July 16, 2016 Author Share Posted July 16, 2016 I'm trying to create a CMS page in order to enter this code.. But I can not, because it is being suggested that I add in the body. How can I do? Link to comment Share on other sites More sharing options...
rocky Posted July 17, 2016 Share Posted July 17, 2016 Assuming you're using the default PrestaShop v1.6 theme, I suggest that you add the JavaScript to themes/default-bootstrap/js/cms.js. That file is only included on CMS pages. (function(e,t,n){var r,i=e.getElementsByTagName(t)[0];if(e.getElementById(n))return;r=e.createElement(t);r.id=n;r.src="//button.aftership.com/all.js";i.parentNode.insertBefore(r,i)})(document,"script","aftership-jssdk") Then put only the two <div> parts into the CMS page itself. 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