I want to add js in my custom module layout xml file Below is my code:

<reference name="head">
   <action method="addJs"><script>varien/provfvfvfvf.js</script></action>

I have added js but I wont be able to see this js in my module pages. Whats the thing which I m missing please let me know

  • <reference name="head"> <action method="addJs"><script>varien/provfvfvfvf.js</script></action></reference> this is my code which I m using
    – konika
    Aug 17, 2015 at 8:37
  • check the cache and clear it Aug 17, 2015 at 8:38
  • where provfvfvfvf.js this file is their in your folder structure Aug 17, 2015 at 8:39
  • it should be under js/varien/provfvfvfvf.js then it will work fine Aug 17, 2015 at 8:40
  • my file path is /skin/frontend/tm_themes/theme724/js/lib/elevatezoom/jquery.elevateZoom-3.0.8.min.js
    – konika
    Aug 17, 2015 at 8:42

2 Answers 2


You have specify the Handle. If you want to add the js files for all page use default handle. i.e.,

    <reference name="head">
        <action method="addJs"><script>varien/provfvfvfvf.js</script></action>

Or else you want to add only one page





Refer this Link


I use this snippet:

<action method="addItem"><type>skin_js</type><name>js/script.js</name></action>


Add layout update in module's config app/code/.../Your/Module/etc/config.xml


Put it in layout update file app/design/frontend/base/default/layout/your_module.xml

    <reference name="head">
        <action method="addItem"><type>skin_js</type><name>js/script.js</name></action>

I used handle default but you can use any other handle, according to your needs, e.g. yourmodule_controller_action.

Your js file should be in skin/frontend/base/default/js/script.js.

  • under which tag you used it?
    – konika
    Aug 17, 2015 at 8:51
  • <reference name="head"> You can place your js file in skin/frontend/base/default/...
    – mkutyba
    Aug 17, 2015 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.