class Carrier extends AbstractModel

Class Carrier

Constants

SHIPPING_METHOD_WEIGHT

SHIPPING_METHOD_PRICE

RANGE_BEHAVIOUR_DEACTIVATE

RANGE_BEHAVIOUR_LARGEST

Properties

int $id from AbstractModel
static array $shippingMethods
static array $rangeBehaviours
string $name
string $label
string $delay
int $grade
int $image
string $trackingUrl
bool $isFree
int $taxRuleGroupId
TaxRuleGroup $taxRuleGroup
int $rangeBehaviour
string $class
int[] $shopIds

Methods

static  null|AbstractModel
getById($id)

get Carrier by ID.

static  boolean
isMultiShop()

No description

static  boolean
isMultiShopFK()

No description

static  AbstractModel
create()

Create new instance of Pimcore Object.

static  AbstractModel|null
getByShopId($id, null $shopId = null)

No description

static  null|AbstractModel
getByField( string $field, string $value, int $shopId = null)

Get Range by id.

static  AbstractListing
getList()

get listing class.

static  AbstractModel[]
getAll()

get all carriers.

int
getId()

No description

setId( int $id)

No description

string
getCacheKey()

No description

save()

save model to database.

bool
delete()

delete model.

getLocalizedFields()

Get LocalizedFields Provider.

setLocalizedFields($localizedFields)

Get LocalizedFields Provider.

AbstractModel
setValue($key, $value)

Override setValue function to support localized fields.

string
__toString()

No description

array
__sleep()

Prepare object to goto sleep.

__wakeup()

Prepare object to wakeup.

static  Carrier[]
getCarriersForCart( Cart $cart = null, Address $address = null)

Get all available Carriers for cart.

static  Carrier|null
getCheapestCarrierForCart( Cart $cart, Address $address = null)

Get cheapest carrier for cart.

getShippingRuleGroups()

get shipping rule groups

getShippingRules()

Get all shipping rules for this carrier

bool
checkCarrierForCart( Cart $cart = null, Address $address = null)

Check if carrier is allowed for cart and address.

float|bool
getMaxDeliveryPrice( Cart $cart = null, Address $address = null)

Get max possible delivery price for this carrier.

bool|float|null
getDeliveryPrice( Cart $cart, bool $withTax = true, Address $address = null)

get delivery price for carrier

float
getTaxAmount( Cart $cart, Address $address = null)

get delivery Tax for cart.

int
getTaxRate( Cart $cart)

get delivery Tax rate for cart.

getTaxCalculator( Address $address = null)

get TaxCalculator.

string
getName()

No description

setName( string $name)

No description

string
getLabel()

No description

setLabel( string $label)

No description

string
getDelay()

No description

setDelay( string $delay)

No description

int
getGrade()

No description

setGrade( int $grade)

No description

int
getImage()

No description

setImage( int $image)

No description

Image|null
getImageAsset()

No description

string
getTrackingUrl()

No description

setTrackingUrl( string $trackingUrl)

No description

bool
getIsFree()

No description

setIsFree( bool $isFree)

No description

int
getTaxRuleGroupId()

No description

setTaxRuleGroupId( int $taxRuleGroupId)

No description

getTaxRuleGroup()

No description

setTaxRuleGroup( int|TaxRuleGroup $taxRuleGroup)

No description

int
getRangeBehaviour()

No description

setRangeBehaviour( int $rangeBehaviour)

No description

string
getClass()

No description

setClass( string $class)

No description

int[]
getShopIds()

No description

setShopIds( int[] $shopIds)

No description

Details

at line line 121
static null|AbstractModel getById($id)

get Carrier by ID.

Parameters

$id

Return Value

null|AbstractModel

in AbstractModel at line line 80
static boolean isMultiShop()

Return Value

boolean

in AbstractModel at line line 94
static boolean isMultiShopFK()

Return Value

boolean

in AbstractModel at line line 112
static AbstractModel create()

Create new instance of Pimcore Object.

Return Value

AbstractModel

Exceptions

Exception

in AbstractModel at line line 122
static AbstractModel|null getByShopId($id, null $shopId = null)

Parameters

$id
null $shopId

Return Value

AbstractModel|null

in AbstractModel at line line 170
static null|AbstractModel getByField( string $field, string $value, int $shopId = null)

Get Range by id.

Parameters

string $field
string $value
int $shopId

Return Value

null|AbstractModel

in AbstractModel at line line 223
static AbstractListing getList()

get listing class.

Return Value

AbstractListing

Exceptions

Exception

at line line 187
static AbstractModel[] getAll()

get all carriers.

Return Value

AbstractModel[]

in AbstractModel at line line 253
int getId()

Return Value

int

in AbstractModel at line line 261
setId( int $id)

Parameters

int $id

in AbstractModel at line line 269
string getCacheKey()

Return Value

string

at line line 302
save()

save model to database.

in AbstractModel at line line 294
bool delete()

delete model.

Return Value

bool

in AbstractModel at line line 310
LocalizedFields|null getLocalizedFields()

Get LocalizedFields Provider.

Return Value

LocalizedFields|null

in AbstractModel at line line 329
setLocalizedFields($localizedFields)

Get LocalizedFields Provider.

Parameters

$localizedFields

in AbstractModel at line line 342
AbstractModel setValue($key, $value)

Override setValue function to support localized fields.

Parameters

$key
$value

Return Value

AbstractModel

at line line 542
string __toString()

Return Value

string

in AbstractModel at line line 370
array __sleep()

Prepare object to goto sleep.

Return Value

array

in AbstractModel at line line 390
__wakeup()

Prepare object to wakeup.

at line line 204
static Carrier[] getCarriersForCart( Cart $cart = null, Address $address = null)

Get all available Carriers for cart.

Parameters

Cart $cart
Address $address

Return Value

Carrier[]

at line line 255
static Carrier|null getCheapestCarrierForCart( Cart $cart, Address $address = null)

Get cheapest carrier for cart.

Parameters

Cart $cart
Address $address

Return Value

Carrier|null

at line line 314
ShippingRuleGroup[] getShippingRuleGroups()

get shipping rule groups

Return Value

ShippingRuleGroup[]

at line line 329
ShippingRule[] getShippingRules()

Get all shipping rules for this carrier

Return Value

ShippingRule[]

at line line 354
bool checkCarrierForCart( Cart $cart = null, Address $address = null)

Check if carrier is allowed for cart and address.

Parameters

Cart $cart
Address $address

Return Value

bool

Exceptions

UnsupportedException

at line line 383
float|bool getMaxDeliveryPrice( Cart $cart = null, Address $address = null)

Get max possible delivery price for this carrier.

Parameters

Cart $cart
Address $address

Return Value

float|bool

at line line 422
bool|float|null getDeliveryPrice( Cart $cart, bool $withTax = true, Address $address = null)

get delivery price for carrier

Parameters

Cart $cart
bool $withTax
Address $address

Return Value

bool|float|null

at line line 484
float getTaxAmount( Cart $cart, Address $address = null)

get delivery Tax for cart.

Parameters

Cart $cart
Address $address

Return Value

float

at line line 503
int getTaxRate( Cart $cart)

get delivery Tax rate for cart.

Parameters

Cart $cart

Return Value

int

at line line 521
bool|TaxCalculator getTaxCalculator( Address $address = null)

get TaxCalculator.

Parameters

Address $address

Return Value

bool|TaxCalculator

at line line 550
string getName()

Return Value

string

at line line 558
setName( string $name)

Parameters

string $name

at line line 566
string getLabel()

Return Value

string

at line line 574
setLabel( string $label)

Parameters

string $label

at line line 582
string getDelay()

Return Value

string

at line line 590
setDelay( string $delay)

Parameters

string $delay

at line line 598
int getGrade()

Return Value

int

at line line 606
setGrade( int $grade)

Parameters

int $grade

at line line 614
int getImage()

Return Value

int

at line line 622
setImage( int $image)

Parameters

int $image

at line line 630
Image|null getImageAsset()

Return Value

Image|null

at line line 637
string getTrackingUrl()

Return Value

string

at line line 645
setTrackingUrl( string $trackingUrl)

Parameters

string $trackingUrl

at line line 653
bool getIsFree()

Return Value

bool

at line line 661
setIsFree( bool $isFree)

Parameters

bool $isFree

at line line 669
int getTaxRuleGroupId()

Return Value

int

at line line 679
setTaxRuleGroupId( int $taxRuleGroupId)

Parameters

int $taxRuleGroupId

Exceptions

Exception

at line line 687
TaxRuleGroup getTaxRuleGroup()

Return Value

TaxRuleGroup

at line line 701
setTaxRuleGroup( int|TaxRuleGroup $taxRuleGroup)

Parameters

int|TaxRuleGroup $taxRuleGroup

Exceptions

Exception

at line line 714
int getRangeBehaviour()

Return Value

int

at line line 722
setRangeBehaviour( int $rangeBehaviour)

Parameters

int $rangeBehaviour

at line line 730
string getClass()

Return Value

string

at line line 738
setClass( string $class)

Parameters

string $class

at line line 746
int[] getShopIds()

Return Value

int[]

at line line 754
setShopIds( int[] $shopIds)

Parameters

int[] $shopIds