OXID eShop CE  4.10.2
 All Classes Namespaces Files Functions Variables Pages
oxDiscountList Class Reference
+ Inheritance diagram for oxDiscountList:
+ Collaboration diagram for oxDiscountList:

Public Member Functions

 __construct ()
 getCountryId ($oUser)
 forceReload ()
 getArticleDiscounts ($oArticle, $oUser=null)
 getBasketItemDiscounts ($oArticle, $oBasket, $oUser=null)
 getBasketDiscounts ($oBasket, $oUser=null)
 getBasketItemBundleDiscounts ($oArticle, $oBasket, $oUser=null)
 getBasketBundleDiscounts ($oBasket, $oUser=null)
 hasSkipDiscountCategories ()
- 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 ()
 __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 ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

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

Protected Attributes

 $_sUserId = null
 $_blReload = true
 $_hasSkipDiscountCategories = null
- Protected Attributes inherited from oxList
 $_aArray = array()
 $_blRemovedActive = false
 $_sObjectsInListName = 'oxBase'
 $_sCoreTable = null
 $_sShopID = null
 $_aSqlLimit = array()

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

Discount list manager. Organizes list of discount objects.

Definition at line 8 of file oxdiscountlist.php.

Constructor & Destructor Documentation

oxDiscountList::__construct ( )

Class Constructor

Returns
null

Reimplemented from oxSuperCfg.

Definition at line 38 of file oxdiscountlist.php.

Member Function Documentation

oxDiscountList::_getFilterSelect (   $oUser)
protected

Creates discount list filter SQL to load current state discount list

Parameters
object$oUseruser object
Returns
string

Definition at line 103 of file oxdiscountlist.php.

oxDiscountList::_getList (   $oUser = null)
protected

Initializes current state discount list For iterating through the list, use getArray() on the list, as iterating on object itself can cause concurrency problems.

Parameters
object$oUseruser object (optional)
Returns
array

Definition at line 52 of file oxdiscountlist.php.

oxDiscountList::forceReload ( )

Used to force discount list reload

Definition at line 91 of file oxdiscountlist.php.

oxDiscountList::getArticleDiscounts (   $oArticle,
  $oUser = null 
)

Returns array of discounts that can be globally (transparently) applied

Parameters
object$oArticlearticle object
object$oUseroxuser object (optional)
Returns
array

Definition at line 165 of file oxdiscountlist.php.

oxDiscountList::getBasketBundleDiscounts (   $oBasket,
  $oUser = null 
)

Returns array of basket bundle discounts

Parameters
oxbasket$oBasketoxbasket object
oxuser$oUseroxuser object (optional)
Returns
array

Definition at line 251 of file oxdiscountlist.php.

oxDiscountList::getBasketDiscounts (   $oBasket,
  $oUser = null 
)

Returns array of discounts that can be applied for whole basket

Parameters
object$oBasketbasket
object$oUseruser object (optional)
Returns
array

Definition at line 208 of file oxdiscountlist.php.

oxDiscountList::getBasketItemBundleDiscounts (   $oArticle,
  $oBasket,
  $oUser = null 
)

Returns array of bundle discounts that can be applied for whole basket

Parameters
object$oArticlearticle object
object$oBasketbasket
object$oUseruser object (optional)
Returns
array

Definition at line 230 of file oxdiscountlist.php.

oxDiscountList::getBasketItemDiscounts (   $oArticle,
  $oBasket,
  $oUser = null 
)

Returns array of discounts that can be applied for individual basket item

Parameters
mixed$oArticlearticle object or article id (according to needs)
object$oBasketarray of basket items containing article id, amount and price
object$oUseruser object (optional)
Returns
array

Definition at line 187 of file oxdiscountlist.php.

oxDiscountList::getCountryId (   $oUser)

Returns user country id for for discount selection

Parameters
oxuser$oUseroxuser object
Returns
string

Definition at line 78 of file oxdiscountlist.php.

oxDiscountList::hasSkipDiscountCategories ( )

Checks if any category has "skip discounts" status

Returns
bool

Definition at line 269 of file oxdiscountlist.php.

Member Data Documentation

oxDiscountList::$_blReload = true
protected

Definition at line 23 of file oxdiscountlist.php.

oxDiscountList::$_hasSkipDiscountCategories = null
protected

Definition at line 31 of file oxdiscountlist.php.

oxDiscountList::$_sUserId = null
protected

Definition at line 16 of file oxdiscountlist.php.


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