Currency
GetCurrency
Gets a currency from a specfic store.
Arguments
Name | Type | Default | Description |
currencyId | long | | The currency id. |
storeId | long | _storeId | Id of the store. |
async | boolean | false | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
currency | A currency object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
currencyId | long | The currency id. |
Return values
Type | Description |
Currency | A currency object. |
Example
GetCurrencies
Gets the currencies for a specific store that are allowed in the current payment country region. Will fallback to current payment country.
Arguments
Name | Type | Default | Description |
storeId | long | _storeId | Id of the store. |
onlyAllowed | boolean | true | Specify if only currencies allowed in the current session state will be returned. |
async | boolean | false | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
currency[] | A collection of currency objects. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
onlyAllowed | bool | Specify if only currencies allowed in the current session state will be returned. |
Return values
Type | Description |
IEnumerable<Currency> | A collection of currency objects. |
Example
GetCurrentCurrency
Gets the current currency of the customer's session. If the customer has a current order the currency of that order is returned.
Arguments
Name | Type | Default | Description |
storeId | long | _storeId | Id of the store. |
async | boolean | false | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
currency | A currency object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
Return values
Type | Description |
Currency | The current currency. |
Example
SetCurrentCurrency
Changes the current currency of the customer's session. The currency is also changed for the customer's current order if present.
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
currencyId | long | Id of the currency to change to. |
Example
Arguments
Name | Type | Default | Description |
currencyId | | | The currency id. |
storeId | long | _storeId | Id of the store. |
async | boolean | true | Specifies if a request should be asynchronously. |
successfn | function(json[, jQForm]) | | A function to be called if the request succeeds. |
errorfn | function(json) | | A function to be called if the request fails. |
Return values
Type | Description |
methodsCalled | An object containing information about the methods called, related data to the methods and the order object if present.
Will only be returned if you use async = false |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
currencyId | long | Id of the currency to change to. |
Return values
Type | Description |
Currency | The current currency. |
Example
Last Updated: 9/2/2019, 10:22:34 AM