Reputation: 21
I am trying to add a couple of JS to Magento. I am trying to modify the "product-shop" so that it stays fixed when scrolling down. Here is a Fiddle of what I am trying to do http://jsfiddle.net/PXadg/
`$(document).ready(function() {
$('#summary').scrollToFixed({
marginTop:
$('.header').outerHeight() + 10,
limit:
$('.footer').offset().top -
$('#summary').outerHeight() -
10
});
});`
Can anyone help me by telling me where I need to make changes in XML or phml files so that Magento runs this scripts?
Regards,
Upvotes: 2
Views: 4652
Reputation: 2174
Add this to your xml file
<catalog_product_view>
<reference name="head">
<action method="addJs"><script>yourscript.js</script></action>
</reference>
</catalog_product_view>
make sure to clear cache after changing this. Also clear your browser history.
Upvotes: 1