CoolCMS API

ShippingPriceResult
in package

FinalYes

Result of {@see \App\UI\Api\Eshop\Models\Services\ShippingPriceResolver}: the concrete tariff price row (weight interval) that covers the given weight at the given date. Decimal columns stay numeric strings (bcmath, no float rounding).

isFree / priceAfterFreeFrom reflect the free_from threshold (an order above it ships free); the resolver applies it only when the caller passes cartTotal. Without it isFree stays false and priceAfterFreeFrom === price (the threshold could not be evaluated).

weightTo is nullable: null means an open upper band without limit (a generation may have at most one, and it must have the highest weightFrom). A caller that displays weightTo must handle null ("and more"), not cast it to 0 or ''.

Table of Contents

Properties

$currencyId  : int
$dateFrom  : string
$freeFrom  : string|null
$isFree  : bool
$price  : string
$priceAfterFreeFrom  : string
$shipperTariffPriceId  : int
$tariffId  : int
$vatId  : int|null
$weightFrom  : string
$weightTo  : string|null

Methods

__construct()  : mixed
getPriceAfterFreeFromAsFloat()  : float
getPriceAsFloat()  : float
withItemWaiver()  : self
The same result shipping free because an item of the order has "free delivery" ({@see \App\UI\Api\Eshop\Models\Services\OrderFreeShippingFlags}).

Properties

Methods

__construct()

public __construct(int $shipperTariffPriceId, int $tariffId, int $currencyId, int|null $vatId, string $dateFrom, string $weightFrom, string|null $weightTo, string $price, string|null $freeFrom, bool $isFree, string $priceAfterFreeFrom) : mixed
Parameters
$shipperTariffPriceId : int
$tariffId : int
$currencyId : int
$vatId : int|null
$dateFrom : string
$weightFrom : string
$weightTo : string|null
$price : string
$freeFrom : string|null
$isFree : bool
$priceAfterFreeFrom : string

getPriceAfterFreeFromAsFloat()

public getPriceAfterFreeFromAsFloat() : float
Return values
float

withItemWaiver()

The same result shipping free because an item of the order has "free delivery" ({@see \App\UI\Api\Eshop\Models\Services\OrderFreeShippingFlags}).

public withItemWaiver() : self
Return values
self
On this page

Search results