CyberStore Price Web Service
MethodFormatNumberAsCustomerCurrency
CyberStore Price Web Service > All Operations Resource Group : FormatNumberAsCustomerCurrency (Method)
Description
Converts a number into a string displayed in the current Shopper's currency. Introduced in 2.19.0.
Request (FormatNumberAsCustomerCurrencySoapIn)

The request body is of type http://www.theoutdoorscompany.com/Ecommerce/Services/Price/:FormatNumberAsCustomerCurrency.

Request Body Parameters

NameDescriptionData Type
A number to format as a currency.xml:decimal
Indicates if the formatted results are to be formatted using the number of decimal places configured for a unit or total.xml:boolean
Example
The following example shows how to perform the web operation in CyberStore.
// 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)
200 Response (FormatNumberAsCustomerCurrencySoapOut)

The response body is of type http://www.theoutdoorscompany.com/Ecommerce/Services/Price/:FormatNumberAsCustomerCurrencyResponse.

Response Body Parameters

NameDescriptionData Type
// 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
See Also
All Operations Resource GroupCyberStore Price Web Service