simpleCart(js)

items
Items:
Total:

simpleCart.toCurrency( number [ , options ] )

arguments:

  • number: number to be converted to currency
  • options (optional): options for currency formatting, used to override settings returned by simpleCart.currency()

returns:

  • The given number formatted as currency, using the simpleCart.currency() options and any given options.

See the Currency Documentation for more info about currency options.

simpleCart({
  currency: "USD"
});

simpleCart.toCurrency( 9.99 ); // $9.99
simpleCart.toCurrency( 9.99, { symbol: '#' } ); // #9.99


Comments

  1. There are no comments for this entry yet.
Commenting is not available in this channel entry.