Class ProductShippingCost

Instances of ProductShippingCost represent product specific shipping costs.

Use ProductShippingModel.getShippingCost(ShippingMethod) to get the shipping cost for a specific product.

PropertyDescription
amount: Money (read-only)Returns the shipping amount.
fixedPrice: Boolean (read-only)Returns true if shipping cost is a fixed-price shipping cost, and false if surcharge shipping cost.
surcharge: Boolean (read-only)Returns true if shipping cost is a surcharge to the shipment shipping cost, and false if fixed-price shipping cost.

This class does not have a constructor, so you cannot create it directly.

MethodDescription
getAmount()Returns the shipping amount.
isFixedPrice()Returns true if shipping cost is a fixed-price shipping cost, and false if surcharge shipping cost.
isSurcharge()Returns true if shipping cost is a surcharge to the shipment shipping cost, and false if fixed-price shipping cost.

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

amount: Money (read-only)

Returns the shipping amount.


fixedPrice: Boolean (read-only)

Returns true if shipping cost is a fixed-price shipping cost, and false if surcharge shipping cost.


surcharge: Boolean (read-only)

Returns true if shipping cost is a surcharge to the shipment shipping cost, and false if fixed-price shipping cost.


getAmount(): Money

Returns the shipping amount.

Returns:

  • Shipping amount

isFixedPrice(): Boolean

Returns true if shipping cost is a fixed-price shipping cost, and false if surcharge shipping cost.

Returns:

  • true of fixed-price shipping cost, else false

isSurcharge(): Boolean

Returns true if shipping cost is a surcharge to the shipment shipping cost, and false if fixed-price shipping cost.

Returns:

  • true of surcharge shipping cost, else false