Magento is a dog. I think that much is clear. My task is to make it a greyhound vs the poodle it now is. To do this I have to remove some JS files that are loading on every page and only load them on necessary pages.
One example is lib/ccard.js. This is a credit card verification script that is only used on the onepagecheckout billing.phtml file. I can comment out the line in page.xml to remove it from all pages but I can't figure out the valid XML to load it into the onepagecheckout area.
I added a line at checkout.xml under the "One page checkout main layout" area but that just crashes the cart.
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
<action method="addJs"><script>lib/ccard.js</script></action>
</reference>
If anyone can specifically tell me how to do this that would be wonderful!
No comments:
Post a Comment