The function formatCurrency in js.js is returning 0.0, i have followed the flow and it goes well until here

if (format.pattern.indexOf('{sign}') == -1) {
    pattern = s + format.pattern;
} else {
    pattern = format.pattern.replace('{sign}', s);

return pattern.replace('%s',r).replace(/^\s\s*/, '').replace(/\s\s*$/, '');

if i return price before this it returns the actual price but dont show the sign. i havend changed anything in the code. any idea where is the problem ?

closed as too broad by Marius May 12 '15 at 6:35

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


How are you trying to implement formatCurrency? Personally, i'd use something like this to do the job:

Mage::helper('core')->formatPrice($product->getFinalPrice(), true);

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