Country
GetCountry
Gets a country from a specfic store.
Arguments
Name | Type | Default | Description |
countryId | long | | Id of the country. |
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 |
country | A country object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
countryId | long | Id of the country. |
Return values
Type | Description |
Country | A country object. |
Example
GetCountries
Gets the countries for a specific store.
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 |
country[] | A collection of country objects. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
Return values
Type | Description |
IEnumerable<Country> | A collection of country objects. |
Example
GetCurrentPaymentCountry
Gets the current payment country of the customer's session. If the customer has a current order the payment country 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 |
country | A country object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
Return values
Type | Description |
Country | The current payment country object. |
Example
GetCurrentShippingCountry
Gets the current shipping country of the customer's session. If the customer has a current order the shipping country 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 |
country | A country object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
Return values
Type | Description |
Country | The current shipping country object. |
Example
SetCurrentPaymentCountry
Changes the current payment country of the customer's session. The payment country is also changed for the customer's current order if present. If the country is changed and the current currency isn't allowed in this country - then the currency will change to the default currency of the new payment country. It is the same with the current shipping method and payment method.
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
countryRegionId | long | Id of the country region to change to. |
Example
Arguments
Name | Type | Default | Description |
countryId | long | | Id of the country to change to. |
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. |
countryId | long | Id of the country to change to. |
Return values
Type | Description |
Country | The new current payment country object. |
Example
SetCurrentShippingCountry
Changes the current shipping country of the customer's session. The shipping country is also changed for the customer's current order if present. If the country is changed and the current shipping method isn't allowed in this country - then the shipping method will change to the default shipping method of the new shipping country. If no current shipping country is specified it will fallback to use the payment country.
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
countryRegionId | long? | Id of the country region to change to. |
Example
Arguments
Name | Type | Default | Description |
countryId | long? | | Id of the country to change to. |
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. |
countryId | long? | Id of the country to change to. |
Return values
Type | Description |
Country | The new current shipping country object. |
Example
Last Updated: 2/6/2019, 8:40:54 AM