Class ProductShippingCost

Instances of ProductShippingCost represent product specific shipping costs.

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

Property Summary 

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.

Constructor Summary 

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

Method Summary 

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.

Methods inherited from class Object 

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

Property Details 

amount 

amount: Money (read-only)

Returns the shipping amount.


fixedPrice 

fixedPrice: Boolean (read-only)

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


surcharge 

surcharge: Boolean (read-only)

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


Method Details 

getAmount() 

getAmount(): Money

Returns the shipping amount.

Returns:

  • Shipping amount

isFixedPrice() 

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() 

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

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!