Created
February 2, 2012 21:48
-
-
Save rgranadino/1725978 to your computer and use it in GitHub Desktop.
Fixing formatCurrency method in magento's js.js (pre 1.6) to not stomp out omniture's global 's' object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (formatCurrency) {//Encapsulate formatCurrency to prevent global variable leaking.... | |
formatCurrency = (function(f) { | |
var origMethod = Object.clone(f); | |
return function(price, format, showPlus) { | |
return origMethod(price, format,showPlus); | |
}; | |
}(formatCurrency)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment