Public Member Functions |
| __construct () |
| setHomeCountry ($sHomeCountry) |
| getDeliveryList ($oBasket, $oUser=null, $sDelCountry=null, $sDelSet=null) |
| hasDeliveries ($oBasket, $oUser, $sDelCountry, $sDeliverySetId) |
| getUser () |
| setUser ($oUser) |
| setCollectFittingDeliveriesSets ($blCollectFittingDeliveriesSets=false) |
| loadDeliveryListForProduct ($oProduct) |
| offsetExists ($offset) |
| offsetGet ($offset) |
| offsetSet ($offset, $oBase) |
| offsetUnset ($offset) |
| arrayKeys () |
| rewind () |
| current () |
| key () |
| prev () |
| next () |
| valid () |
| count () |
| clear () |
| assign ($aArray) |
| reverse () |
| __construct ($sObjectName=null) |
| __get ($sName) |
| getArray () |
| init ($sObjectName, $sCoreTable=null) |
| getBaseObject () |
| setBaseObject ($oObject) |
| selectString ($sSql) |
| add ($oObject) |
| assignArray ($aData) |
| setSqlLimit ($iStart, $iRecords) |
| containsFieldValue ($oVal, $sFieldName) |
| getList () |
| __call ($sMethod, $aArgs) |
| getConfig () |
| setConfig ($oConfig) |
| getSession () |
| setSession ($oSession) |
| isAdmin () |
| setAdminMode ($blAdmin) |
Detailed Description
Delivery list manager.
Definition at line 7 of file oxdeliverylist.php.
Constructor & Destructor Documentation
oxDeliveryList::__construct |
( |
| ) |
|
Member Function Documentation
oxDeliveryList::_getFilterSelect |
( |
|
$oUser, |
|
|
|
$sCountryId, |
|
|
|
$sDelSet |
|
) |
| |
|
protected |
Creates delivery list filter SQL to load current state delivery list
- Parameters
-
oxUser | $oUser | session user object |
string | $sCountryId | user country id |
string | $sDelSet | user chosen delivery set |
- Returns
- string
Definition at line 136 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 according to these parameters
- Parameters
-
oxUser | $oUser | session user object |
string | $sCountryId | user country id |
string | $sDelSet | user chosen delivery set |
- Returns
- array
Definition at line 95 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 delivery set list by calling this::GetDeliverySetList(...);
- checks if there is any active (eg. chosen delivery set in order process etc) delivery set defined and if its set - rearranges delivery set list by storing active set at the beginning in the list.
goes through delivery sets 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 | $oBasket | basket object |
oxUser | $oUser | session user |
string | $sDelCountry | user country id |
string | $sDelSet | delivery set id |
- Returns
- array
Definition at line 222 of file oxdeliverylist.php.
oxDeliveryList::getUser |
( |
| ) |
|
oxDeliveryList::hasDeliveries |
( |
|
$oBasket, |
|
|
|
$oUser, |
|
|
|
$sDelCountry, |
|
|
|
$sDeliverySetId |
|
) |
| |
Checks if deliveries in list fits for current basket and delivery set
- Parameters
-
oxBasket | $oBasket | shop basket |
oxUser | $oUser | session user |
string | $sDelCountry | delivery country |
string | $sDeliverySetId | delivery set id to check its relation to delivery list |
- Returns
- bool
Definition at line 301 of file oxdeliverylist.php.
oxDeliveryList::loadDeliveryListForProduct |
( |
|
$oProduct | ) |
|
oxDeliveryList::setCollectFittingDeliveriesSets |
( |
|
$blCollectFittingDeliveriesSets = false | ) |
|
Force or not to collect deliveries sets instead of deliveries when getting deliveries list in getDeliveryList()
- Parameters
-
bool | $blCollectFittingDeliveriesSets | collect deliveries sets or not |
Definition at line 349 of file oxdeliverylist.php.
oxDeliveryList::setHomeCountry |
( |
|
$sHomeCountry | ) |
|
Home country setter
- Parameters
-
string | $sHomeCountry | home country id |
Definition at line 72 of file oxdeliverylist.php.
oxDeliveryList::setUser |
( |
|
$oUser | ) |
|
Member Data Documentation
oxDeliveryList::$_aDeliveries = array() |
|
protected |
oxDeliveryList::$_blCollectFittingDeliveriesSets = false |
|
protected |
oxDeliveryList::$_blPerfLoadDelivery = null |
|
protected |
oxDeliveryList::$_oUser = null |
|
protected |
oxDeliveryList::$_sHomeCountry = null |
|
protected |
oxDeliveryList::$_sUserId = null |
|
protected |
The documentation for this class was generated from the following file: