Previous Docs Version
The documentation you are viewing is for a previous version of Tea Commerce. Click here to jump to the current stable version.
Previous Docs Version
The documentation you are viewing is for a previous version of Tea Commerce. Click here to jump to the current stable version.
Gets a country region from a specfic store.
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. |
Type | Description |
---|---|
countryRegion | A country region object. |
var countryRegion = TC.getCountryRegion({storeId:1, countryRegionId:2});
Gets the country regions for a specific store. Specify the countryId parameter to only get country regions for this country.
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. |
Type | Description |
---|---|
countryRegion[] | A collection of country region objects. |
var countryRegions = TC.getCountryRegions({storeId:1});
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.
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. |
Type | Description |
---|---|
countryRegion | A country region object. |
var countryRegion = TC.getCurrentPaymentCountryRegion({storeId:1});
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.
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. |
Type | Description |
---|---|
countryRegion | A country region object. |
var countryRegion = TC.getCurrentShippingCountryRegion({storeId:1});
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.
Name | Type | Description |
---|---|---|
storeId | long | Id of the store. |
countryRegionId | long? | Id of the country region to change to. |
<form method="post" action="/base/TC/FormPost.aspx">
<input name="SetCurrentPaymentCountryRegion" value="countryRegionId" type="hidden" />
<input name="storeId" value="1" type="hidden" />
<input name="countryRegionId" value="3" type="hidden" />
<input value="Change payment country region" type="submit" />
</form>
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.
Name | Type | Description |
---|---|---|
storeId | long | Id of the store. |
countryRegionId | long? | Id of the country region to change to. |
<form method="post" action="/base/TC/FormPost.aspx">
<input name="SetCurrentShippingCountryRegion" value="countryRegionId" type="hidden" />
<input name="storeId" value="1" type="hidden" />
<input name="countryRegionId" value="3" type="hidden" />
<input value="Change shipping country region" type="submit" />
</form>