OXID eShop CE  6.1.4
OxidEsales\EshopCommunity\Application\Model\Delivery Class Reference
+ Inheritance diagram for OxidEsales\EshopCommunity\Application\Model\Delivery:
+ Collaboration diagram for OxidEsales\EshopCommunity\Application\Model\Delivery:

Public Member Functions

 __construct ()
 
 setDelVatOnTop ($blOnTop)
 
 getArticles ()
 
 getCategories ()
 
 hasArticles ()
 
 hasCategories ()
 
 getDeliveryAmount ($oBasketItem)
 
 setDeliveryPrice ($oPrice)
 
 getDeliveryPrice ($dVat=null)
 
 delete ($sOxId=null)
 
 isForBasket ($oBasket)
 
 getIdByName ($sTitle)
 
 getCountriesISO ()
 
 getConditionType ()
 
 getConditionFrom ()
 
 getConditionTo ()
 
 getCalculationRule ()
 
 getAddSum ()
 
 getAddSumType ()
 

Public Attributes

const CALCULATION_RULE_ONCE_PER_CART = 0
 
const CALCULATION_RULE_FOR_EACH_DIFFERENT_PRODUCT = 1
 
const CALCULATION_RULE_FOR_EACH_PRODUCT = 2
 
const CONDITION_TYPE_PRICE = 'p'
 
const CONDITION_TYPE_AMOUNT = 'a'
 
const CONDITION_TYPE_SIZE = 's'
 
const CONDITION_TYPE_WEIGHT = 'w'
 

Protected Member Functions

 _isForArticle ($content, $artAmount)
 
 updateItemCount ($content)
 
 increaseProductCount ()
 
 _checkDeliveryAmount ($iAmount)
 
 _getMultiplier ()
 
 _getCostSum ()
 
 isDeliveryRuleFitByArticle ($artAmount)
 

Protected Attributes

 $_sClassName = 'oxdelivery'
 
 $_iItemCnt = 0
 
 $_iProdCnt = 0
 
 $_dPrice = 0
 
 $_oPrice = null
 
 $_aArtIds = null
 
 $_aCatIds = null
 
 $_blFreeShipping = true
 
 $_blDelVatOnTop = false
 
 $_aCountriesISO = null
 
 $_aRDFaDeliverySet = null
 

Static Protected Attributes

static $_aProductList = []
 

Detailed Description

Order delivery manager. Currently calculates price/costs.

Constructor & Destructor Documentation

◆ __construct()

OxidEsales\EshopCommunity\Application\Model\Delivery::__construct ( )

Class constructor, initiates parent constructor (parent::oxBase()).

Member Function Documentation

◆ _checkDeliveryAmount()

OxidEsales\EshopCommunity\Application\Model\Delivery::_checkDeliveryAmount (   $iAmount)
protected

checks if amount param is ok for this delivery

Parameters
double$iAmountamount
Returns
boolean

◆ _getCostSum()

OxidEsales\EshopCommunity\Application\Model\Delivery::_getCostSum ( )
protected

Calculate cost sum

Returns
float

◆ _getMultiplier()

OxidEsales\EshopCommunity\Application\Model\Delivery::_getMultiplier ( )
protected

Calculate multiplier for price calculation

Returns
float|int

◆ _isForArticle()

OxidEsales\EshopCommunity\Application\Model\Delivery::_isForArticle (   $content,
  $artAmount 
)
protected

Checks if delivery fits for one article

Deprecated:
in b-dev since (2015-07-27), use isDeliveryRuleFitByArticle instead
Parameters
object$contentshop basket item
integer$artAmountproduct amount
Returns
bool

◆ delete()

OxidEsales\EshopCommunity\Application\Model\Delivery::delete (   $sOxId = null)

Delete this object from the database, returns true on success.

Parameters
string$sOxIdObject ID (default null)
Returns
bool

◆ getAddSum()

OxidEsales\EshopCommunity\Application\Model\Delivery::getAddSum ( )

Returns amount cost

Returns
float

◆ getAddSumType()

OxidEsales\EshopCommunity\Application\Model\Delivery::getAddSumType ( )

Returns type of cost: % - percentage; abs - absolute value

Returns
string

◆ getArticles()

OxidEsales\EshopCommunity\Application\Model\Delivery::getArticles ( )

Collects article Ids which are assigned to current delivery

Returns
array

◆ getCalculationRule()

OxidEsales\EshopCommunity\Application\Model\Delivery::getCalculationRule ( )

Returns calculation rule: 0 - Once per Cart; 1 - Once for each different product 2 - For each product

Returns
int

◆ getCategories()

OxidEsales\EshopCommunity\Application\Model\Delivery::getCategories ( )

Collects category Ids which are assigned to current delivery

Returns
array

◆ getConditionFrom()

OxidEsales\EshopCommunity\Application\Model\Delivery::getConditionFrom ( )

Returns condition from value (type >= from <= to)

Returns
string

◆ getConditionTo()

OxidEsales\EshopCommunity\Application\Model\Delivery::getConditionTo ( )

Returns condition to value (type >= from <= to)

Returns
string

◆ getConditionType()

OxidEsales\EshopCommunity\Application\Model\Delivery::getConditionType ( )

Returns condition type (type >= from <= to) : a - amount, s - size, w -weight, p - price

Returns
string

◆ getCountriesISO()

OxidEsales\EshopCommunity\Application\Model\Delivery::getCountriesISO ( )

Returns array of country ISO's which are assigned to current delivery

Returns
array

◆ getDeliveryAmount()

OxidEsales\EshopCommunity\Application\Model\Delivery::getDeliveryAmount (   $oBasketItem)

Returns amount (total net price/weight/volume/Amount) on which delivery price is applied

Parameters
\OxidEsales\Eshop\Application\Model\BasketItem$oBasketItembasket item object
Returns
double

◆ getDeliveryPrice()

OxidEsales\EshopCommunity\Application\Model\Delivery::getDeliveryPrice (   $dVat = null)

Returns oxPrice object for delivery costs

Parameters
double$dVatdelivery vat
Returns
\OxidEsales\Eshop\Core\Price

◆ getIdByName()

OxidEsales\EshopCommunity\Application\Model\Delivery::getIdByName (   $sTitle)

returns delivery id

Parameters
string$sTitledelivery name
Returns
string

◆ hasArticles()

OxidEsales\EshopCommunity\Application\Model\Delivery::hasArticles ( )

Checks if delivery has assigned articles

Returns
bool

◆ hasCategories()

OxidEsales\EshopCommunity\Application\Model\Delivery::hasCategories ( )

Checks if delivery has assigned categories

Returns
bool

◆ increaseProductCount()

OxidEsales\EshopCommunity\Application\Model\Delivery::increaseProductCount ( )
protected

Increase count of products which are covered by current delivery.

◆ isDeliveryRuleFitByArticle()

OxidEsales\EshopCommunity\Application\Model\Delivery::isDeliveryRuleFitByArticle (   $artAmount)
protected

Checks if delivery rule applies for basket because of one article's amount. Delivery rules that are to be applied once per cart can be ruled out here.

Parameters
integer$artAmountproduct amount
Returns
bool

◆ isForBasket()

OxidEsales\EshopCommunity\Application\Model\Delivery::isForBasket (   $oBasket)

Checks if delivery fits for current basket

Parameters
\OxidEsales\Eshop\Application\Model\Basket$oBasketshop basket
Returns
bool

◆ setDeliveryPrice()

OxidEsales\EshopCommunity\Application\Model\Delivery::setDeliveryPrice (   $oPrice)

Delivery price setter

Parameters
\OxidEsales\Eshop\Core\Price$oPricedelivery price to set

◆ setDelVatOnTop()

OxidEsales\EshopCommunity\Application\Model\Delivery::setDelVatOnTop (   $blOnTop)

Delivery VAT config setter

Parameters
bool$blOnTopdelivery vat config

◆ updateItemCount()

OxidEsales\EshopCommunity\Application\Model\Delivery::updateItemCount (   $content)
protected

Update total count of product items are covered by current delivery.

Parameters
\OxidEsales\Eshop\Application\Model\BasketItem$content

Member Data Documentation

◆ $_aArtIds

OxidEsales\EshopCommunity\Application\Model\Delivery::$_aArtIds = null
protected

◆ $_aCatIds

OxidEsales\EshopCommunity\Application\Model\Delivery::$_aCatIds = null
protected

◆ $_aCountriesISO

OxidEsales\EshopCommunity\Application\Model\Delivery::$_aCountriesISO = null
protected

◆ $_aProductList

OxidEsales\EshopCommunity\Application\Model\Delivery::$_aProductList = []
staticprotected

◆ $_aRDFaDeliverySet

OxidEsales\EshopCommunity\Application\Model\Delivery::$_aRDFaDeliverySet = null
protected

◆ $_blDelVatOnTop

OxidEsales\EshopCommunity\Application\Model\Delivery::$_blDelVatOnTop = false
protected

◆ $_blFreeShipping

OxidEsales\EshopCommunity\Application\Model\Delivery::$_blFreeShipping = true
protected

◆ $_dPrice

OxidEsales\EshopCommunity\Application\Model\Delivery::$_dPrice = 0
protected

◆ $_iItemCnt

OxidEsales\EshopCommunity\Application\Model\Delivery::$_iItemCnt = 0
protected

◆ $_iProdCnt

OxidEsales\EshopCommunity\Application\Model\Delivery::$_iProdCnt = 0
protected

◆ $_oPrice

OxidEsales\EshopCommunity\Application\Model\Delivery::$_oPrice = null
protected

◆ $_sClassName

OxidEsales\EshopCommunity\Application\Model\Delivery::$_sClassName = 'oxdelivery'
protected

◆ CALCULATION_RULE_FOR_EACH_DIFFERENT_PRODUCT

const OxidEsales\EshopCommunity\Application\Model\Delivery::CALCULATION_RULE_FOR_EACH_DIFFERENT_PRODUCT = 1

◆ CALCULATION_RULE_FOR_EACH_PRODUCT

const OxidEsales\EshopCommunity\Application\Model\Delivery::CALCULATION_RULE_FOR_EACH_PRODUCT = 2

◆ CALCULATION_RULE_ONCE_PER_CART

const OxidEsales\EshopCommunity\Application\Model\Delivery::CALCULATION_RULE_ONCE_PER_CART = 0

Calculation rule

◆ CONDITION_TYPE_AMOUNT

const OxidEsales\EshopCommunity\Application\Model\Delivery::CONDITION_TYPE_AMOUNT = 'a'

◆ CONDITION_TYPE_PRICE

const OxidEsales\EshopCommunity\Application\Model\Delivery::CONDITION_TYPE_PRICE = 'p'

Condition type

◆ CONDITION_TYPE_SIZE

const OxidEsales\EshopCommunity\Application\Model\Delivery::CONDITION_TYPE_SIZE = 's'

◆ CONDITION_TYPE_WEIGHT

const OxidEsales\EshopCommunity\Application\Model\Delivery::CONDITION_TYPE_WEIGHT = 'w'

The documentation for this class was generated from the following file: