docs
  1. SCAYLE Resource Center
  2. Developer Guides
  3. Checkout
  4. Customization
  5. Configure JSON
  6. Currency, dates & name formats

Currency, dates & name formats

We provide the following configuration options that control how currencies, dates and names are displayed within the frontend. Included within each section is a sample configuration that can help you get started.

Currency

Configuration Key: currency


Available Properties

This is used to define which currency is displayed on the frontend for prices.


{
    "currency": "EUR"
}
Names

Configuration Key: names


Available Properties

  • firstName: Object
  • lastName: Object
    • (see Field Validation).
    • position: first | second
      • This is is used if you want to have the last name displayed before the first name.

This is used to define the order of the first and last name fields as well as define general validation rules.


{
    "names": {
        "firstName": {
            "minLength": 1,
            "maxLength": 30,
            "format": "name"
        },
        "lastName": {
            "position": "second",
            "minLength": 1,
            "maxLength": 50,
            "format": "name"
        }
    }
}
Formats

Configuration Key: formats


Available Properties

  • date: string
    • Specify the format in which dates are displayed and validated. See all options
  • currency: string
    • Specify how currencies are displayed. "symbol" to use a localized currency symbol such as €, "narrowSymbol" to use a narrow format symbol ("$100" rather than "US$100"), "code" to use the ISO currency code, "name" to use a localized currency name such as "dollar", see Intl.NumberFormat
  • hideCurrencyDecimals: boolean
    • Hide currency decimals (used for weak currencies in some countries)

{
    "formats": {
        "date": "YYYY-MM-DD",
        "currency": "code",
        "hideCurrencyDecimals": false
    }
}