SimpleCart v2 Snippets scNumberFormat

The scNumberFormat snippet can be used to format a number. It's typically used as an output modifier on a placeholder.

Note: in most cases, especially when it comes to prices and percentages, there will already be a formatted placeholder available. For example when [[+price]] is available, [[+price_formatted]] is most likely available with a fully formatted number.

Standard Usage



The following options can be provided. Each option is separated with a &.

  • d: number of decimals (default 2)
  • ds: decimal separator (default ,)
  • ts: thousands separator (default .)
  • s: symbol to prefix to the output.