Class ProductShippingModel
Instances of ProductShippingModel provide access to product-level shipping information, such as applicable or inapplicable shipping methods and shipping cost defined for the product for a specified shipping method.
Use ShippingMgr.getProductShippingModel(Product) to get the shipping model for a specific product.
| Property | Description |
|---|---|
applicableShippingMethods: Collection (read-only) | Returns the active applicable shipping methods for the product related to this shipping model, i.e. |
inapplicableShippingMethods: Collection (read-only) | Returns the active inapplicable shipping methods for the product related to this shipping model, i.e. |
shippingMethodsWithShippingCost: Collection (read-only) | Returns the active shipping methods for which either any fixed-price or surcharge product-level shipping cost is defined for the specified product. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| getApplicableShippingMethods() | Returns the active applicable shipping methods for the product related to this shipping model, i.e. |
| getInapplicableShippingMethods() | Returns the active inapplicable shipping methods for the product related to this shipping model, i.e. |
| getShippingCost(ShippingMethod) | Returns the shipping cost object for the related product and the specified shipping method, or null if no product-level fixed-price or surcharge shipping cost are defined for the specified product. |
| getShippingMethodsWithShippingCost() | Returns the active shipping methods for which either any fixed-price or surcharge product-level shipping cost is defined for the specified product. |
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
- applicableShippingMethods: Collection
(read-only) Returns the active applicable shipping methods for the product related to this shipping model, i.e. shipping methods the product can be shipped with. A product can be shipping with a shipping methods if the shipping method is not explicitely marked as inapplicable for this product.
- inapplicableShippingMethods: Collection
(read-only) Returns the active inapplicable shipping methods for the product related to this shipping model, i.e. shipping methods the product cannot be shipped with. A product cannot be shipping with a shipping methods if the shipping method is explicitely marked as inapplicable for this product.
- shippingMethodsWithShippingCost: Collection
(read-only) Returns the active shipping methods for which either any fixed-price or surcharge product-level shipping cost is defined for the specified product.
Note that this can include inapplicable shipping methods (see getInapplicableShippingMethods()).
- getApplicableShippingMethods(): Collection
Returns the active applicable shipping methods for the product related to this shipping model, i.e. shipping methods the product can be shipped with. A product can be shipping with a shipping methods if the shipping method is not explicitely marked as inapplicable for this product.
Returns:
- Applicable shipping methods for the product
- getInapplicableShippingMethods(): Collection
Returns the active inapplicable shipping methods for the product related to this shipping model, i.e. shipping methods the product cannot be shipped with. A product cannot be shipping with a shipping methods if the shipping method is explicitely marked as inapplicable for this product.
Returns:
- Inapplicable shipping methods for the product
- getShippingCost(shippingMethod: ShippingMethod): ProductShippingCost
Returns the shipping cost object for the related product and the specified shipping method, or null if no product-level fixed-price or surcharge shipping cost are defined for the specified product.
The following rules apply:
- if fixed and surcharge shipping cost is defined for a product, the fixed cost takes precedence
- if a product is member of multiple shipping cost groups, the lowest shipping cost takes precedence
Parameters:
- shippingMethod - the shipping method to use.
Returns:
- Product shipping cost
- getShippingMethodsWithShippingCost(): Collection
Returns the active shipping methods for which either any fixed-price or surcharge product-level shipping cost is defined for the specified product.
Note that this can include inapplicable shipping methods (see getInapplicableShippingMethods()).
Returns:
- Shipping methods with shipping cost