Shipping Method
GetShippingMethod
Gets a shipping method from a specfic store.
Arguments
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. |
Return values
Type | Description |
shippingMethod | A shipping method object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
shippingMethodId | long | Id of the shipping method. |
Return values
Type | Description |
ShippingMethod | A shipping method object. |
Example
GetShippingMethods
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.
Arguments
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. |
Return values
Type | Description |
shippingMethod[] | A collection of shipping method objects. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
onlyAllowed | bool | Specify if only shipping methods allowed in the current session state will be returned. |
Return values
Type | Description |
IEnumerable<ShippingMethod> | A collection of shipping methods. |
Example
GetCurrentShippingMethod
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.
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 |
shippingMethod | A shipping method object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
Return values
Type | Description |
ShippingMethod | The current shipping method object. |
Example
SetCurrentShippingMethod
Changes the current shipping method of the customer's session. The shipping method is also changed for the customer's current order if present.
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
shippingMethodId | long? | Id of the shipping method to change to. |
Example
Arguments
Name | Type | Default | Description |
shippingMethodId | long? | | The shipping method 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. |
shippingMethodId | long? | Id of the shipping method. |
Return values
Type | Description |
ShippingMethod | The new current shipping method object. |
Example
GetPriceForShippingMethod
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.
Arguments
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. |
Return values
Type | Description |
price | A price object. |
Example
Arguments
Name | Type | Description |
storeId | long | Id of the store. |
shippingMethodId | long | Id of the shipping method. |
Return values
Type | Description |
Price | A price object. |
Example
Last Updated: 9/2/2019, 10:22:34 AM