Ecwid.formatCurrency

Format a number using currency format of a store

var currencyFormat = Ecwid.formatCurrency(12.99);

console.log(currencyFormat);

// prints
// "$12.99"

Converts the given currency value to a human-readable string according to the store settings. It accepts both string and integer as arguments.

Subscribe to the Ecwid.OnAPILoaded JS API event to ensure availability of this function.