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 shipping method from a specfic store.
Name | Type | Default | Description |
---|---|---|---|
shippingMethodId | long | Id of the shipping method. | |
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 |
---|---|
shippingMethod | A shipping method object. |
var shippingMethod = TC.getshippingMethod({storeId:1, shippingMethodId:2});
Gets a collection of all shipping methods that are allowed in the current shipping country and shipping country region - fallback to the payment country and country region.
Name | Type | Default | Description |
---|---|---|---|
storeId | long | _storeId | Id of the store. |
onlyAllowed | boolean | true | Specify if only payment methods 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. |
Type | Description |
---|---|
shippingMethod[] | A collection of shipping method objects. |
var shippingMethods = TC.getShippingMethods({storeId:1});
Gets the current shipping method of the customer's session. If the customer has a current order the shipping method 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 |
---|---|
shippingMethod | A shipping method object. |
var shippingMethod = TC.getCurrentShippingMethod({storeId:1});
Changes the current shipping method of the customer's session. The shipping method is also changed for the customer's current order if present.
Name | Type | Description |
---|---|---|
storeId | long | Id of the store. |
shippingMethodId | long? | Id of the shipping method to change to. |
<form method="post" action="/base/TC/FormPost.aspx">
<input name="SetCurrentShippingMethod" value="shippingMethodId" type="hidden" />
<input name="storeId" value="1" type="hidden" />
<input name="shippingMethodId" value="3" type="hidden" />
<input value="Change shipping method" type="submit" />
</form>
Get the price for a specific shipping method, based on the customers current currency, shipping country and shipping country region - fallback to the payment country and country region.
Name | Type | Default | Description |
---|---|---|---|
shippingMethodId | long | Id of the shipping method. | |
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 |
---|---|
price | A price object. |
var price = TC.getPriceForShippingMethod({storeId:1, shippingMethodId:2});