Tuesday, September 13

How to Add a javascript file to your magento page templates

Customising your magento store can be a good way to set your store apart from the competition so adding features that require javascript files is a common task when building a project. Learn how to include a javscript file into your magento page templates with this quick how to.The default layout template load is made primarily through the page.xml file located at the following url for custom themed installs /app/design/frontend/your-instance-name/your-theme-name/layout/page.xml , or for the default theme at /app/design/frontend/default/default/layout/page.xml.

Find the following block encapsulator and simply add the following command inside the block



Then upload you updated page.xml file.

With that done, you need to now upload your javascript file to /skin/frontend/your-instance-name/your-theme-name/js/yourscriptname.js, or for the default theme /skin/frontend/default/default/js/yourscriptname.js

Hope it Helps... Thanks....

No comments:

Post a Comment