Country Region
GetCountryRegion
Gets a country region from a specfic store.
Arguments
Name | Type | Default | Description |
countryRegionId | long | | Id of the country region |
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 |
countryRegion | A country region object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
countryRegionId | long | Id of the country region |
Return values
Type | Description |
CountryRegion | A country region object. |
Example
GetCountryRegions
Gets the country regions for a specific store. Specify the countryId parameter to only get country regions for this country.
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 |
countryRegion[] | A collection of country region objects. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
countryId | long? | Id of the country. |
Return values
Type | Description |
IEnumerable<CountryRegion> | A collection of country region objects. |
Example
GetCurrentPaymentCountryRegion
Gets the current payment country region of the customer's session. If the customer has a current order the payment country region 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 |
countryRegion | A country region object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
Return values
Type | Description |
CountryRegion | A country region object. |
Example
GetCurrentShippingCountryRegion
Gets the current shipping country region of the customer's session. If the customer has a current order the shipping country region 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 |
countryRegion | A country region object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
Return values
Type | Description |
CountryRegion | A country region object. |
Example
SetCurrentPaymentCountryRegion
Changes the current payment country region of the customer's session. The payment country region is also changed for the customer's current order if present. If the country region is changed and the current payment and method isn't allowed in this country region - then the payment method will change to the default payment method of the new payment country region. If no current payment country region 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 |
countryRegionId | long? | | Id of the country region 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. |
countryRegionId | long? | Id of the country region to change to. |
Return values
Type | Description |
CountryRegion | The new current payment country region object. |
Example
SetCurrentShippingCountryRegion
Changes the current shipping country region of the customer's session. The shipping country region is also changed for the customer's current order if present. If the country region is changed and the current shipping method isn't allowed in this country region - then the shipping method will change to the default shipping method of the new shipping country region. If no current shipping country region is specified it will fallback to use the shipping country and then 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 |
countryRegionId | long? | | Id of the country region 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. |
countryRegionId | long? | Id of the country region to change to. |
Return values
Type | Description |
CountryRegion | The new current shipping country region object. |
Example
Last Updated: 9/2/2019, 10:22:34 AM