

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) | |
| getBundleAmount ($dAmount) | |
| getSimpleDiscount () | |
Protected Member Functions | |
| _checkForArticleCategories ($oArticle) | |
Protected Attributes | |
| $_sClassName = 'oxdiscount' | |
| $_dAmount = null | |
| $_sBasketIdent = null | |
| oxDiscount.__construct | ( | ) |
Class constructor, initiates parent constructor (parent.oxBase()).
Reimplemented from oxI18n.
| oxDiscount.delete | ( | $ | sOXID = null |
) |
Delete this object from the database, returns true on success.
| string | $sOXID Object ID(default null) |
Reimplemented from oxBase.
| oxDiscount.isForArticle | ( | $ | oArticle | ) |
Checks if discount is setup for article
| object | $oArticle article object |
| oxDiscount.isForBasketItem | ( | $ | oArticle | ) |
Checks if discount is setup for some basket item
| object | $oArticle basket item |
| 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 |
| oxDiscount.isForAmount | ( | $ | dAmount | ) |
Tests if passed amount or price fits current discount (price priority)
| double | $dAmount amount or price to check (price priority) |
| oxDiscount.isForBasket | ( | $ | oBasket | ) |
Checks if discount is setup for whole basket
| object | $oBasket basket object |
| oxDiscount.isForBundleItem | ( | $ | oArticle | ) |
Checks if discount type is bundle discount
| object | $oArticle article object |
| oxDiscount.isForBundleBasket | ( | $ | oBasket | ) |
Checks if discount type is whole basket bundle discount
| object | $oBasket basket object |
| 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) |
| oxDiscount.applyDiscount | ( | $ | oPrice, | |
| $ | dAmount = 1 | |||
| ) |
Applies discount for current price
| oxprice | $oPrice basket item price object | |
| double | $dAmount basket item amount (default 1) |
| oxDiscount.getBundleAmount | ( | $ | dAmount | ) |
Returns amount of items to bundle
| double | $dAmount item amount |
| oxDiscount._checkForArticleCategories | ( | $ | oArticle | ) | [protected] |
Checks if discount may be applied according amounts info
| object | $oArticle article object to chesk | |
| bool | $blSpecForItem check individually for passed item. If false - will be checked for categories item belongs | |
| mixed | $oBasketInfo basket info as returned by $oBasket->getBasketSummary() |
| oxDiscount.getSimpleDiscount | ( | ) |
Returns compact discount object which is used in oxbasket
oxDiscount.$_sClassName = 'oxdiscount' [protected] |
Reimplemented from oxI18n.
oxDiscount.$_dAmount = null [protected] |
oxDiscount.$_sBasketIdent = null [protected] |
1.5.5