Currency

evoShop(js) has a number of currencies that are already supported out of the box. You can specify the currency a number of ways, such as setting the option:

evoShop({
currency : "GPB" // set the currency to pounds sterling
})

You can also set the currency using the .currency() function:

evoShop.currency( "EUR" ); // set the currency to Euros

The built-in currencies are listed below, but you can also set a new currency using the .currency() function:

evoShop.currency({ 
    code: "BTC" ,
    name: "Bitcoin" ,
    symbol: "BTC" 
});

There are a number of formatting options when setting a currency as well. For example, if you wanted your currency to be formatted as 123 456,780 $AWE instead of $123,456.78, you would use:

evoShop.currency({
    code: "MAC" ,
    name: "My Awesome Currency" ,
    symbol: " $AWE" ,
    delimiter: " " , 
    decimal: "," , 
    after: true ,
    accuracy: 3
});

If you would like to see what the currency is currently set to, you can call the .currency() function with no arguments:

evoShop.currency("USD");

evoShop.currency();  // returns { code:"USD", symbol:"$", name:"US Dollar" } 

Built-in currencies:

"NAN": { code: "NAN", symbol: "", name: "NAN" },
"USD": { code: "USD", symbol: "$", name: "US Dollar" },
"AUD": { code: "AUD", symbol: "$", name: "Australian Dollar" },
"BRL": { code: "BRL", symbol: "R$", name: "Brazilian Real" },
"CAD": { code: "CAD", symbol: "$", name: "Canadian Dollar" },
"CZK": { code: "CZK", symbol: " Kč", name: "Czech Koruna", after: true },
"DKK": { code: "DKK", symbol: "DKK ", name: "Danish Krone" },
"EUR": { code: "EUR", symbol: "€", name: "Euro" },
"HKD": { code: "HKD", symbol: "$", name: "Hong Kong Dollar" },
"HRK": { code: "HRK", symbol: " kn", name: "Croatian kuna", accuracy: 2, decimal: ",", delimiter: "", after: true },
"HUF": { code: "HUF", symbol: "Ft", name: "Hungarian Forint" },
"ILS": { code: "ILS", symbol: "₪", name: "Israeli New Sheqel" },
"JPY": { code: "JPY", symbol: "¥", name: "Japanese Yen", accuracy: 0 },
"MXN": { code: "MXN", symbol: "$", name: "Mexican Peso" },
"NOK": { code: "NOK", symbol: "NOK ", name: "Norwegian Krone" },
"NZD": { code: "NZD", symbol: "$", name: "New Zealand Dollar" },
"PLN": { code: "PLN", symbol: "PLN ", name: "Polish Zloty" },
"GBP": { code: "GBP", symbol: "£", name: "Pound Sterling" },
"SGD": { code: "SGD", symbol: "$", name: "Singapore Dollar" },
"SEK": { code: "SEK", symbol: "SEK ", name: "Swedish Krona" },
"CHF": { code: "CHF", symbol: "CHF ", name: "Swiss Franc" },
"THB": { code: "THB", symbol: "฿", name: "Thai Baht" },
"BTC": { code: "BTC", symbol: " BTC", name: "Bitcoin", accuracy: 4, after: true	},
"RUB": { code: "RUB", symbol: " руб", name: "Russian Rouble", accuracy: 2, decimal: ",", delimiter: "", after: true },
"UAH": { code: "UAH", symbol: " грн", name: "Ukrainian Hryvnia", accuracy: 2, decimal: ",", delimiter: "", after: true }

If there are errors or problems with the default formatting of your currency, please let us know so we can update the base code