Public Member Functions |
| __construct ($sObjectsInListName= 'oxdiscount') |
| 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) |
| applyDiscounts ($oPrice, $aDiscounts) |
| applyBasketDiscounts (oxPrice $oPrice, $aDiscounts, $dAmount=1) |
| hasSkipDiscountCategories () |
| 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 () |
| __call ($sMethod, $aArgs) |
| __construct () |
| getConfig () |
| setConfig ($oConfig) |
| getSession () |
| setSession ($oSession) |
| getUser () |
| setUser ($oUser) |
| isAdmin () |
| setAdminMode ($blAdmin) |
Static Protected Attributes |
static | $_instance = null |
Detailed Description
Discount list manager. Organizes list of discount objects.
Definition at line 8 of file oxdiscountlist.php.
Constructor & Destructor Documentation
oxDiscountList::__construct |
( |
|
$sObjectsInListName = 'oxdiscount' | ) |
|
Class Constructor
- Parameters
-
string | $sObjectsInListName | Associated list item object type |
Reimplemented from oxList.
Definition at line 44 of file oxdiscountlist.php.
Member Function Documentation
oxDiscountList::_getFilterSelect |
( |
|
$oUser | ) |
|
|
protected |
Creates discount list filter SQL to load current state discount list
- Parameters
-
- Returns
- string
Definition at line 123 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 | $oUser | user object (optional) |
- Returns
- array
Definition at line 70 of file oxdiscountlist.php.
oxDiscountList::applyBasketDiscounts |
( |
oxPrice |
$oPrice, |
|
|
|
$aDiscounts, |
|
|
|
$dAmount = 1 |
|
) |
| |
Applies discounts which are supposed to be applied on amounts greater than zero. Returns applied discounts.
- Parameters
-
oxPrice | $oPrice | Old article price |
array | $aDiscounts | Discount array |
amount | $dAmount | Amount in basket |
- Deprecated:
- since v5.0 (2012-09-14); use oxPrice class discount calculation methods;
- Returns
- array
Definition at line 314 of file oxdiscountlist.php.
oxDiscountList::applyDiscounts |
( |
|
$oPrice, |
|
|
|
$aDiscounts |
|
) |
| |
Applies discounts which should be applied in general case (for 0 amount)
- Parameters
-
oxprice | $oPrice | Price object |
array | $aDiscounts | Discount list |
- Deprecated:
- since v5.0 (2012-09-14); use oxPrice class discount calculation methods;
- Returns
- null
Definition at line 294 of file oxdiscountlist.php.
oxDiscountList::forceReload |
( |
| ) |
|
oxDiscountList::getArticleDiscounts |
( |
|
$oArticle, |
|
|
|
$oUser = null |
|
) |
| |
Returns array of discounts that can be globally (transparently) applied
- Parameters
-
object | $oArticle | article object |
object | $oUser | oxuser object (optional) |
- Returns
- array
Definition at line 185 of file oxdiscountlist.php.
oxDiscountList::getBasketBundleDiscounts |
( |
|
$oBasket, |
|
|
|
$oUser = null |
|
) |
| |
Returns array of basket bundle discounts
- Parameters
-
oxbasket | $oBasket | oxbasket object |
oxuser | $oUser | oxuser object (optional) |
- Returns
- array
Definition at line 271 of file oxdiscountlist.php.
oxDiscountList::getBasketDiscounts |
( |
|
$oBasket, |
|
|
|
$oUser = null |
|
) |
| |
Returns array of discounts that can be applied for whole basket
- Parameters
-
object | $oBasket | basket |
object | $oUser | user object (optional) |
- Returns
- array
Definition at line 228 of file oxdiscountlist.php.
oxDiscountList::getBasketItemBundleDiscounts |
( |
|
$oArticle, |
|
|
|
$oBasket, |
|
|
|
$oUser = null |
|
) |
| |
Returns array of bundle discounts that can be applied for whole basket
- Parameters
-
object | $oArticle | article object |
object | $oBasket | basket |
object | $oUser | user object (optional) |
- Returns
- array
Definition at line 250 of file oxdiscountlist.php.
oxDiscountList::getBasketItemDiscounts |
( |
|
$oArticle, |
|
|
|
$oBasket, |
|
|
|
$oUser = null |
|
) |
| |
Returns array of discounts that can be applied for individual basket item
- Parameters
-
mixed | $oArticle | article object or article id (according to needs) |
object | $oBasket | array of basket items containing article id, amount and price |
object | $oUser | user object (optional) |
- Returns
- array
Definition at line 207 of file oxdiscountlist.php.
oxDiscountList::getCountryId |
( |
|
$oUser | ) |
|
Returns user country id for for discount selection
- Parameters
-
oxuser | $oUser | oxuser object |
- Returns
- string
Definition at line 96 of file oxdiscountlist.php.
static oxDiscountList::getInstance |
( |
| ) |
|
|
static |
oxDiscountList::hasSkipDiscountCategories |
( |
| ) |
|
Checks if any category has "skip discounts" status
- Returns
- bool
Definition at line 343 of file oxdiscountlist.php.
Member Data Documentation
oxDiscountList::$_blReload = true |
|
protected |
oxDiscountList::$_hasSkipDiscountCategories = null |
|
protected |
oxDiscountList::$_instance = null |
|
staticprotected |
oxDiscountList::$_sUserId = null |
|
protected |
The documentation for this class was generated from the following file: