Inheritance diagram for oxDiscountList:
Collaboration diagram for oxDiscountList: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 () | |
Static Public Member Functions | |
| static | getInstance () |
Protected Member Functions | |
| _getList ($oUser=null) | |
| _getFilterSelect ($oUser) | |
Protected Attributes | |
| $_sUserId = null | |
| $_blReload = true | |
| $_hasSkipDiscountCategories = null | |
Static Protected Attributes | |
| static | $_instance = null |
Discount list manager. Organizes list of discount objects.
Definition at line 7 of file oxdiscountlist.php.
| oxDiscountList.__construct | ( | $ | sObjectsInListName = 'oxdiscount' |
) |
Class Constructor
| string | $sObjectsInListName Associated list item object type |
Reimplemented from oxList.
Definition at line 43 of file oxdiscountlist.php.
| oxDiscountList._getFilterSelect | ( | $ | oUser | ) | [protected] |
Creates discount list filter SQL to load current state discount list
| object | $oUser user object |
Definition at line 132 of file oxdiscountlist.php.
| oxDiscountList._getList | ( | $ | oUser = null |
) | [protected] |
Initializes current state discount list
| object | $oUser user object (optional) |
Definition at line 79 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.
| oxPrice | $oPrice Old article price | |
| array | $aDiscounts Discount array | |
| amount | $dAmount Amount in basket |
Definition at line 318 of file oxdiscountlist.php.
| oxDiscountList.applyDiscounts | ( | $ | oPrice, | |
| $ | aDiscounts | |||
| ) |
Applies discounts which should be applied in general case (for 0 amount)
| oxprice | $oPrice Price object | |
| array | $aDiscounts Discount list |
Definition at line 300 of file oxdiscountlist.php.
| oxDiscountList.forceReload | ( | ) |
| oxDiscountList.getArticleDiscounts | ( | $ | oArticle, | |
| $ | oUser = null | |||
| ) |
Returns array of discounts that can be globally (transparently) applied
| object | $oArticle article object | |
| object | $oUser oxuser object (optional) |
Definition at line 194 of file oxdiscountlist.php.
| oxDiscountList.getBasketBundleDiscounts | ( | $ | oBasket, | |
| $ | oUser = null | |||
| ) |
Returns array of basket bundle discounts
| oxbasket | $oBasket oxbasket object | |
| oxuser | $oUser oxuser object (optional) |
Definition at line 279 of file oxdiscountlist.php.
| oxDiscountList.getBasketDiscounts | ( | $ | oBasket, | |
| $ | oUser = null | |||
| ) |
Returns array of discounts that can be applied for whole basket
| object | $oBasket basket | |
| object | $oUser user object (optional) |
Definition at line 237 of file oxdiscountlist.php.
| oxDiscountList.getBasketItemBundleDiscounts | ( | $ | oArticle, | |
| $ | oBasket, | |||
| $ | oUser = null | |||
| ) |
Returns array of bundle discounts that can be applied for whole basket
| object | $oArticle article object | |
| object | $oBasket basket | |
| object | $oUser user object (optional) |
Definition at line 259 of file oxdiscountlist.php.
| oxDiscountList.getBasketItemDiscounts | ( | $ | oArticle, | |
| $ | oBasket, | |||
| $ | oUser = null | |||
| ) |
Returns array of discounts that can be applied for individual basket item
| 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) |
Definition at line 215 of file oxdiscountlist.php.
| oxDiscountList.getCountryId | ( | $ | oUser | ) |
Returns user country id for for discount selection
| oxuser | $oUser oxuser object |
Definition at line 105 of file oxdiscountlist.php.
| static oxDiscountList.getInstance | ( | ) | [static] |
Returns discount list instance
Definition at line 53 of file oxdiscountlist.php.
| oxDiscountList.hasSkipDiscountCategories | ( | ) |
Applies discounts which are supposed to be applied on amounts greater than zero. Returns applied discounts.
| oxPrice | $oPrice Old article price | |
| array | $aDiscounts Discount array | |
| amount | $dAmount Amount in basket |
Definition at line 396 of file oxdiscountlist.php.
oxDiscountList.$_blReload = true [protected] |
Definition at line 28 of file oxdiscountlist.php.
oxDiscountList.$_hasSkipDiscountCategories = null [protected] |
Definition at line 36 of file oxdiscountlist.php.
oxDiscountList.$_instance = null [static, protected] |
Definition at line 14 of file oxdiscountlist.php.
oxDiscountList.$_sUserId = null [protected] |
Definition at line 21 of file oxdiscountlist.php.
1.7.1