OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
oxDeliveryList Class Reference
+ Inheritance diagram for oxDeliveryList:
+ Collaboration diagram for oxDeliveryList:

Public Member Functions

 __construct ($sObjectsInListName= 'oxdelivery')
 setHomeCountry ($sHomeCountry)
 getDeliveryList ($oBasket, $oUser=null, $sDelCountry=null, $sDelSet=null)
 hasDeliveries ($oBasket, $oUser, $sDelCountry, $sDeliverySetId)
 getUser ()
 setUser ($oUser)
 setCollectFittingDeliveriesSets ($blCollectFittingDeliveriesSets=false)
 loadDeliveryListForProduct ($oProduct)
- Public Member Functions inherited from oxList
 offsetExists ($offset)
 offsetGet ($offset)
 offsetSet ($offset, $oBase)
 offsetUnset ($offset)
 arrayKeys ()
 rewind ()
 current ()
 key ()
 prev ()
 next ()
 valid ()
 count ()
 clear ()
 assign ($aArray)
 reverse ()
 __get ($sName)
 getArray ()
 init ($sObjectName, $sCoreTable=null)
 getBaseObject ()
 selectString ($sSql)
 assignArray ($aData)
 setSqlLimit ($iStart, $iRecords)
 containsFieldValue ($oVal, $sFieldName)
 getList ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 isAdmin ()
 setAdminMode ($blAdmin)

Static Public Member Functions

static getInstance ()

Protected Member Functions

 _getList ($oUser=null, $sCountryId=null, $sDelSet=null)
 _getFilterSelect ($oUser, $sCountryId, $sDelSet)
- Protected Member Functions inherited from oxList
 _assignElement ($oListObject, $aDbFields)
 _getFieldLongName ($sFieldName)

Protected Attributes

 $_sUserId = null
 $_blPerfLoadDelivery = null
 $_aDeliveries = array()
 $_oUser = null
 $_sHomeCountry = null
 $_blCollectFittingDeliveriesSets = false
- Protected Attributes inherited from oxList
 $_aArray = array()
 $_blRemovedActive = false
 $_sObjectsInListName = 'oxBase'
 $_sCoreTable = null
 $_sShopID = null
 $_aSqlLimit = array()

Static Private Attributes

static $_instance = null

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Delivery list manager.

Definition at line 7 of file oxdeliverylist.php.

Constructor & Destructor Documentation

oxDeliveryList::__construct (   $sObjectsInListName = 'oxdelivery')

Class constructor, sets callback so that Shopowner is able to add any information to the article.

Parameters
string$sObjectsInListNameObject in list

Reimplemented from oxList.

Definition at line 60 of file oxdeliverylist.php.

Member Function Documentation

oxDeliveryList::_getFilterSelect (   $oUser,
  $sCountryId,
  $sDelSet 
)
protected

Creates delivery list filter SQL to load current state delivery list

Parameters
oxuser$oUsersession user object
string$sCountryIduser country id
string$sDelSetuser chosen delivery set
Returns
string

Definition at line 151 of file oxdeliverylist.php.

oxDeliveryList::_getList (   $oUser = null,
  $sCountryId = null,
  $sDelSet = null 
)
protected

Returns active delivery list

Loads all active delivery in list. Additionally checks if set has user customized parameters like assigned users, countries or user groups. Performs additional filtering accordint to these parameters

Parameters
oxUser$oUsersession user object
string$sCountryIduser country id
string$sDelSetuser chosen delivery set
Returns
array

Definition at line 110 of file oxdeliverylist.php.

oxDeliveryList::getDeliveryList (   $oBasket,
  $oUser = null,
  $sDelCountry = null,
  $sDelSet = null 
)

Loads and returns list of deliveries.

Process:

  • first checks if delivery loading is enabled in config - $myConfig->bl_perfLoadDelivery is TRUE;
  • loads deliveryset list by calling this::GetDeliverySetList(...);
  • checks if there is any active (eg. chosen delset in order process etc) deliveryset defined and if its set - rearanges delivery set list by storing active set at the beginning in the list.
  • goes through delsets and loads its deliveries, checks if any delivery fits. By checking calculates and stores conditional amounts:

    oDelivery->iItemCnt - items in basket that fits this delivery oDelivery->iProdCnt - products in basket that fits this delivery oDelivery->dPrice - price of products that fits this delivery

  • returns a list of deliveries. NOTICE: for performance reasons deliveries is cached in $myConfig->aDeliveryList.
Parameters
object$oBasketbasket object
oxuser$oUsersession user
string$sDelCountryuser country id
string$sDelSetdelivery set id
Returns
array

Definition at line 237 of file oxdeliverylist.php.

static oxDeliveryList::getInstance ( )
static

Returns oxDeliveryList instance

Deprecated:
since v5.0 (2012-08-10); Use oxRegistry::get("oxDeliveryList") instead.
Returns
oxDeliveryList

Definition at line 75 of file oxdeliverylist.php.

oxDeliveryList::getUser ( )

Get current user object. If user is not set, try to get current user.

Returns
oxUser

Reimplemented from oxSuperCfg.

Definition at line 337 of file oxdeliverylist.php.

oxDeliveryList::hasDeliveries (   $oBasket,
  $oUser,
  $sDelCountry,
  $sDeliverySetId 
)

Checks if deliveries in list fits for current basket and delivery set

Parameters
oxbasket$oBasketshop basket
oxuser$oUsersession user
string$sDelCountrydelivery country
string$sDeliverySetIddelivery set id to check its relation to delivery list
Returns
bool

Definition at line 315 of file oxdeliverylist.php.

oxDeliveryList::loadDeliveryListForProduct (   $oProduct)

Load deliverylist for product

Parameters
object$oProductoxarticle object
Returns
null

Definition at line 378 of file oxdeliverylist.php.

oxDeliveryList::setCollectFittingDeliveriesSets (   $blCollectFittingDeliveriesSets = false)

Force or not to collect deliveries sets instead of deliveries when getting deliveries list in getDeliveryList()

Parameters
bool$blCollectFittingDeliveriesSetscollect deliveries sets or not
Returns
null

Definition at line 366 of file oxdeliverylist.php.

oxDeliveryList::setHomeCountry (   $sHomeCountry)

Home country setter

Parameters
string$sHomeCountryhome country id
Returns
null

Definition at line 87 of file oxdeliverylist.php.

oxDeliveryList::setUser (   $oUser)

Set current user object

Parameters
oxUser$oUseruser object
Returns
null

Reimplemented from oxSuperCfg.

Definition at line 353 of file oxdeliverylist.php.

Member Data Documentation

oxDeliveryList::$_aDeliveries = array()
protected

Definition at line 31 of file oxdeliverylist.php.

oxDeliveryList::$_blCollectFittingDeliveriesSets = false
protected

Definition at line 51 of file oxdeliverylist.php.

oxDeliveryList::$_blPerfLoadDelivery = null
protected

Definition at line 25 of file oxdeliverylist.php.

oxDeliveryList::$_instance = null
staticprivate

Definition at line 13 of file oxdeliverylist.php.

oxDeliveryList::$_oUser = null
protected

Definition at line 37 of file oxdeliverylist.php.

oxDeliveryList::$_sHomeCountry = null
protected

Definition at line 44 of file oxdeliverylist.php.

oxDeliveryList::$_sUserId = null
protected

Definition at line 19 of file oxdeliverylist.php.


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