Converts a number into a string displayed in the current Shopper's currency. Introduced in 2.19.0.
Method | FormatNumberAsCustomerCurrency |
The request body is of type http://www.theoutdoorscompany.com/Ecommerce/Services/Price/:FormatNumberAsCustomerCurrency.
Name | Description | Data Type |
---|---|---|
Number | A number to format as a currency. | xml:decimal |
IsTotal | Indicates if the formatted results are to be formatted using the number of decimal places configured for a unit or total. | xml:boolean |
// Example 1: format the number 19.95 as a total // MakeAJAXCall("Price.FormatNumberAsCustomerCurrency", { Number: 19.95, IsTotal: true }, console.log) // Example 2: format the number 19.999 as a total // MakeAJAXCall("Price.FormatNumberAsCustomerCurrency", { Number: 19.999, IsTotal: false }, console.log)
The response body is of type http://www.theoutdoorscompany.com/Ecommerce/Services/Price/:FormatNumberAsCustomerCurrencyResponse.
Name | Description | Data Type |
---|---|---|
FormatNumberAsCustomerCurrencyResult | // Example 1: format the number 19.95 as a total // { "NumberValue": 19.95, "CurrencyValue": "$19.95 " } // Example 2: format the number 19.999 as a total // { "NumberValue": 19.999, "CurrencyValue": "$19.999 " } | xml:string |