Default shipping provider implementation, calculating freight from a combination of a fixed per-cart cost, a fixed per-item cost, and per-item weight and volumetric multipliers. For each cart item, effective weight is the greater of its actual weight (scaled by weightMult) and its volumetric weight (scaled by volumetricMult), falling back to the product's flat freight cost when no weight or dimensions are set. Availability additionally honours the country and weight/cart-cost bounds configured on AbstractShippingProvider. Configured per store and serialised as XML under the "default" alias.

Group: E-commerce

Extends: AbstractShippingProvider


Properties

PropertyReturnsDescription
detailedDescriptionStringA formatted summary of the configured countries, weight limits, and this provider's cost and multiplier settings.
fixedCartCostBigDecimalThe fixed cost added once per cart, on top of the per-item freight costs.
fixedPerItemCostBigDecimalThe fixed cost added per cart item, on top of any weight or volumetric based cost.
managementPageTemplateStringPath to the template used to render this provider's management page in the admin UI.
volumetricMultBigDecimalThe multiplier applied to a product SKU's volumetric weight (height x width x length) to derive its freight cost.
weightMultBigDecimalThe multiplier applied to a product SKU's actual weight in kilograms to derive its freight cost.

Inherited from AbstractShippingProvider

Properties

PropertyReturnsDescription
availableCountriesList<String>The countries this provider ships to.
idStringThe identifier for this provider, used in forms where a user selects a shipping provider.
maxCartCostBigDecimalThe maximum cart cost for which this provider is available.
maxTotalWeightKgsBigDecimalThe maximum total cart weight, in kilograms, for which this provider is available.
minCartCostBigDecimalThe minimum cart cost for which this provider is available.
minTotalWeightKgsBigDecimalThe minimum total cart weight, in kilograms, for which this provider is available.
titleStringThe user-friendly display title for this shipping provider.

Methods

getId()

Returns: String

The identifier for this provider, used in forms where a user selects a shipping provider.

getTitle()

Returns: String

The user-friendly display title for this shipping provider.

getMinTotalWeightKgs()

Returns: BigDecimal

The minimum total cart weight, in kilograms, for which this provider is available.

getMaxTotalWeightKgs()

Returns: BigDecimal

The maximum total cart weight, in kilograms, for which this provider is available.

getMinCartCost()

Returns: BigDecimal

The minimum cart cost for which this provider is available.

getMaxCartCost()

Returns: BigDecimal

The maximum cart cost for which this provider is available.

getAvailableCountries()

Returns: List<String>

The countries this provider ships to.


Methods

getDetailedDescription() · getWeightMult() · getVolumetricMult() · getFixedPerItemCost() · getFixedCartCost() · calcCartFreight(Cart cart) · calcIndividualFreight(ProductSku productSku, BigDecimal quantity, InventoryLocation shipFrom) · isAvailable(Cart cart) · getManagementPageTemplate()

getDetailedDescription()

Returns: String

A formatted summary of the configured countries, weight limits, and this provider's cost and multiplier settings.

getWeightMult()

Returns: BigDecimal

The multiplier applied to a product SKU's actual weight in kilograms to derive its freight cost.

getVolumetricMult()

Returns: BigDecimal

The multiplier applied to a product SKU's volumetric weight (height x width x length) to derive its freight cost.

getFixedPerItemCost()

Returns: BigDecimal

The fixed cost added per cart item, on top of any weight or volumetric based cost.

getFixedCartCost()

Returns: BigDecimal

The fixed cost added once per cart, on top of the per-item freight costs.

calcCartFreight(Cart cart)

Returns: BigDecimal

Calculates the total freight cost for the cart, as the configured fixed cart cost plus the individual freight cost of each product order in the cart.

ParameterDescription
cartthe cart to calculate freight for

calcIndividualFreight(ProductSku productSku, BigDecimal quantity, InventoryLocation shipFrom)

Returns: BigDecimal

Calculates the freight cost for a quantity of a single product SKU, from the configured fixed per-item cost plus a weight or volumetric based cost, or the product's flat freight cost when no weight or dimensions are configured.

ParameterDescription
productSkuthe product SKU being shipped
quantitythe quantity being shipped, treated as one if null
shipFromthe location the item ships from, currently not used by this provider

isAvailable(Cart cart)

Returns: boolean

Whether this provider is available for the given cart, based on the cart's country, cost, and total effective weight against the bounds configured on this provider.

ParameterDescription
cartthe cart to check availability for

getManagementPageTemplate()

Returns: String

Path to the template used to render this provider's management page in the admin UI.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.