0

Hello I am trying to figure out how to add a .js file to the main layout within Magneto I created my js file but can't seem to get it to load in the layout. Where do I need to include the <script> tag in the main layout? I am using Magento ver 1.3.2.4

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
kful
  • 1
  • 1
    I think this question is already answered [here](http://stackoverflow.com/questions/26093139/how-to-add-include-js-file-into-magento-theme) and [here](http://stackoverflow.com/questions/4654822/adding-external-javascript-file-to-magento). – gegillam Jan 12 '16 at 00:50
  • Magento 1.3.2.4? Time to update! – Gerard de Visser Jan 12 '16 at 09:02

1 Answers1

0

You can add your .js file in page.xml file in your theme folder.

Put .js file in your theme package skin/frontend/theme_package/current_theme/js/.js file

add below line under <block type="page/html"> this block in page.xml

<action method="addItem"><type>skin_js</type><name>js/filename.js</name></action>
Dhaval Patel
  • 1,076
  • 6
  • 19