Does anyone know how to have all of Magento's JS script tags e.g. <script type="text/javascript" src="http://sitename.com/js/prototype/prototype.js"></script>
render out before the closing </body>
?
I've tried this once before, but I was given an error which I think was along the lines of the addJS method not being available where I used it, possibly in reference footer.
Best Answer
It depends on your request. For instance, lastly, I had been removed all Prototype scripts from the
Homepage
of the Magento store which I didn't face any problem. But as I said, it depends on your theme, extensions etc.To moving the script :
Find the following line in
page.xml
of your themeAnd insert the following just before :
For Magento 1.9 use this:
Create the template file in app/design/frontend/[package]/[theme]/template/page/html/jsfooter.phtml and put the following
Add below in your template just before closing
</body>
tag.