<?xml version="1.0"?>
<layout>
  <default>
    <reference name="before_body_end">
      <block type="page/html_head" name="extra_js" as="sdJs" after="-" template="somethingdigital/page/html/footer-js.phtml">
          <action method="addItem"><type>skin_js</type><name>js/somethingdigital/ajaxaddtocart.js</name></action>
      </block>
    </reference>
  </default>
</layout>
<?xml version="1.0"?>
<layout>
  <catalog_product_view>
    <reference name="before_body_end">
      <block type="page/html_head" name="extra_js" as="sdJs" after="-" template="somethingdigital/page/html/footer-js.phtml">
          <action method="addItem"><type>skin_js</type><name>js/somethingdigital/ajaxaddtocart.js</name></action>
      </block>
    </reference>
  </catalog_product_view>
</layout>
Make code only appear on product view page
Make code only appear on product view page
