Inheritance diagram for oxDiscount:
 Collaboration diagram for oxDiscount:Public Member Functions | |
| __construct () | |
| delete ($sOXID=null) | |
| isForArticle ($oArticle) | |
| isForBasketItem ($oArticle) | |
| isForBasketAmount ($oBasket) | |
| isForAmount ($dAmount) | |
| isForBasket ($oBasket) | |
| isForBundleItem ($oArticle) | |
| isForBundleBasket ($oBasket) | |
| getAbsValue ($dPrice, $dAmount=1) | |
| applyDiscount ($oPrice, $dAmount=1) | |
| getPercentage ($dPrice) | |
| getAddSum () | |
| getAddSumType () | |
| getBundleAmount ($dAmount) | |
| getSimpleDiscount () | |
| getArticleIds () | |
| getCategoryIds () | |
Protected Member Functions | |
| _checkForArticleCategories ($oArticle) | |
| _getProductCheckQuery ($oProduct) | |
Protected Attributes | |
| $_sClassName = 'oxdiscount' | |
| $_dAmount = null | |
| $_sBasketIdent = null | |
| $_blIsForArticleOrForCategory = null | |
| $_aHasArticleDiscounts = array() | |
Discounts manager.
Definition at line 7 of file oxdiscount.php.
| oxDiscount.__construct | ( | ) | 
Class constructor, initiates parent constructor (parent.oxBase()).
Reimplemented from oxI18n.
Definition at line 47 of file oxdiscount.php.
| oxDiscount._checkForArticleCategories | ( | $ | oArticle | ) |  [protected] | 
        
Checks if discount may be applied according amounts info
| object | $oArticle article object to chesk | 
Definition at line 427 of file oxdiscount.php.
| oxDiscount._getProductCheckQuery | ( | $ | oProduct | ) |  [protected] | 
        
Returns part of query for discount check. If product is variant - query contains both id check e.g. "and (oxobjectid = '...' or oxobjectid = '...')
| oxarticle | $oProduct product used for discount check | 
Definition at line 488 of file oxdiscount.php.
| oxDiscount.applyDiscount | ( | $ | oPrice, | |
| $ |  dAmount = 1 | |||
| ) | 
Applies discount for current price
| oxprice | $oPrice basket item price object | |
| double | $dAmount basket item amount (default 1) | 
Definition at line 340 of file oxdiscount.php.
| oxDiscount.delete | ( | $ |  sOXID = null | 
          ) | 
Delete this object from the database, returns true on success.
| string | $sOXID Object ID(default null) | 
Reimplemented from oxI18n.
Definition at line 60 of file oxdiscount.php.
| oxDiscount.getAbsValue | ( | $ | dPrice, | |
| $ |  dAmount = 1 | |||
| ) | 
Returns absolute discount value
| float | $dPrice item price | |
| float | $dAmount item amount, interpretted only when discount is absolute (default 1) | 
Definition at line 320 of file oxdiscount.php.
| oxDiscount.getAddSum | ( | ) | 
Return add sum in abs type discount with efected currency rate; Return discount percent value in other way;
Definition at line 378 of file oxdiscount.php.
| oxDiscount.getAddSumType | ( | ) | 
| oxDiscount.getArticleIds | ( | ) | 
Returns article ids asigned to discount
Definition at line 465 of file oxdiscount.php.
| oxDiscount.getBundleAmount | ( | $ | dAmount | ) | 
Returns amount of items to bundle
| double | $dAmount item amount | 
Definition at line 408 of file oxdiscount.php.
| oxDiscount.getCategoryIds | ( | ) | 
Returns category ids asigned to discount
Definition at line 475 of file oxdiscount.php.
| oxDiscount.getPercentage | ( | $ | dPrice | ) | 
Return discount percent
| decimal | $dPrice - price from which calculates discount | 
Definition at line 361 of file oxdiscount.php.
| oxDiscount.getSimpleDiscount | ( | ) | 
Returns compact discount object which is used in oxbasket
Definition at line 450 of file oxdiscount.php.
| oxDiscount.isForAmount | ( | $ | dAmount | ) | 
Tests if passed amount or price fits current discount (price priority)
| double | $dAmount amount or price to check (price priority) | 
Definition at line 225 of file oxdiscount.php.
| oxDiscount.isForArticle | ( | $ | oArticle | ) | 
Checks if discount is setup for article
| oxarticle | $oArticle article object | 
Definition at line 83 of file oxdiscount.php.
| oxDiscount.isForBasket | ( | $ | oBasket | ) | 
Checks if discount is setup for whole basket
| object | $oBasket basket object | 
Definition at line 247 of file oxdiscount.php.
| oxDiscount.isForBasketAmount | ( | $ | oBasket | ) | 
Tests if total amount or price (price priority) of articles that can be applied to current discount fits to discount configuration
| oxbasket | $oBasket basket | 
Definition at line 188 of file oxdiscount.php.
| oxDiscount.isForBasketItem | ( | $ | oArticle | ) | 
Checks if discount is setup for some basket item
| object | $oArticle basket item | 
Definition at line 156 of file oxdiscount.php.
| oxDiscount.isForBundleBasket | ( | $ | oBasket | ) | 
Checks if discount type is whole basket bundle discount
| object | $oBasket basket object | 
Definition at line 303 of file oxdiscount.php.
| oxDiscount.isForBundleItem | ( | $ | oArticle | ) | 
Checks if discount type is bundle discount
| object | $oArticle article object | 
Definition at line 280 of file oxdiscount.php.
oxDiscount.$_aHasArticleDiscounts = array() [protected] | 
        
Definition at line 42 of file oxdiscount.php.
oxDiscount.$_blIsForArticleOrForCategory = null [protected] | 
        
Definition at line 35 of file oxdiscount.php.
oxDiscount.$_dAmount = null [protected] | 
        
Definition at line 21 of file oxdiscount.php.
oxDiscount.$_sBasketIdent = null [protected] | 
        
Definition at line 28 of file oxdiscount.php.
oxDiscount.$_sClassName = 'oxdiscount' [protected] | 
        
Reimplemented from oxI18n.
Definition at line 14 of file oxdiscount.php.
 1.7.1