|
OXID eShop CE
4.9.7
|
Inheritance diagram for oxDiscount:
Collaboration diagram for oxDiscount:Public Member Functions | |
| __construct () | |
| delete ($sOXID=null) | |
| isGlobalDiscount () | |
| isForArticle ($oArticle) | |
| isForBasketItem ($oArticle) | |
| isForBasketAmount ($oBasket) | |
| isForAmount ($dAmount) | |
| isForBasket ($oBasket) | |
| isForBundleItem ($oArticle) | |
| isForBundleBasket ($oBasket) | |
| getAbsValue ($dPrice, $dAmount=1) | |
| getPercentage ($dPrice) | |
| getAddSum () | |
| getAddSumType () | |
| getBundleAmount ($dAmount) | |
| getSimpleDiscount () | |
| getArticleIds () | |
| getCategoryIds () | |
Public Member Functions inherited from oxI18n | |
| setLanguage ($iLang=null) | |
| getLanguage () | |
| setEnableMultilang ($blEmployMultilanguage) | |
| isMultilingualField ($sFieldName) | |
| isMultilang () | |
| loadInLang ($iLanguage, $sOxid) | |
| modifyCacheKey ($sCacheKey, $blOverride=false) | |
| getAvailableInLangs () | |
| getUpdateSqlFieldName ($sField) | |
Public Member Functions inherited from oxBase | |
| getUseSkipSaveFields () | |
| setUseSkipSaveFields ($blUseSkipSaveFields) | |
| __set ($sName, $sValue) | |
| __get ($sName) | |
| __isset ($mVar) | |
| __clone () | |
| oxClone ($oObject) | |
| getUpdateSeo () | |
| setUpdateSeo ($blUpdateSeo) | |
| init ($sTableName=null, $blForceAllFields=false) | |
| assign ($dbRecord) | |
| getClassName () | |
| getCoreTableName () | |
| getId () | |
| setId ($sOXID=null) | |
| setShopId ($iShopId) | |
| getShopId () | |
| getViewName ($blForceCoreTableUsage=null) | |
| disableLazyLoading () | |
| isDerived () | |
| setIsDerived ($blVal) | |
| load ($sOXID) | |
| isLoaded () | |
| buildSelectString ($aWhere=null) | |
| assignRecord ($sSelect) | |
| getFieldData ($sFieldName) | |
| getSelectFields ($blForceCoreTableUsage=null) | |
| save () | |
| allowDerivedUpdate () | |
| allowDerivedDelete () | |
| exists ($sOXID=null) | |
| getSqlActiveSnippet ($blForceCoreTable=null) | |
| beforeUpdate ($sOXID=null) | |
| onChange ($iAction=null, $sOXID=null) | |
| setInList () | |
| isOx () | |
| isReadOnly () | |
| setReadOnly ($blReadOnly) | |
| getFieldNames () | |
| addFieldName ($sName) | |
Public Member Functions inherited from oxSuperCfg | |
| __call ($sMethod, $aArgs) | |
| getConfig () | |
| setConfig ($oConfig) | |
| getSession () | |
| setSession ($oSession) | |
| getUser () | |
| setUser ($oUser) | |
| isAdmin () | |
| setAdminMode ($blAdmin) | |
Protected Member Functions | |
| _checkForArticleCategories ($oArticle) | |
| _getProductCheckQuery ($oProduct) | |
| _isArticleAssigned ($oArticle) | |
| _isCategoriesAssigned ($aCategoryIds) | |
Protected Member Functions inherited from oxI18n | |
| _getFieldStatus ($sFieldName) | |
| _getNonCachedFieldNames ($blForceFullStructure=false) | |
| _getFieldLang ($sFieldName) | |
| _setUpdateSeoOnFieldChange ($sField) | |
| _getUpdateFieldsForTable ($sTable, $blUseSkipSaveFields=true) | |
| _getUpdateFields ($blUseSkipSaveFields=true) | |
| _update () | |
| _getLanguageSetTables ($sCoreTableName=null) | |
| _insert () | |
| _getObjectViewName ($sTable, $sShopID=null) | |
| _getAllFields ($blReturnSimple=false) | |
| _addField ($sName, $sStatus, $sType=null, $sLength=null) | |
| _canFieldBeNull ($sFieldName) | |
Protected Member Functions inherited from oxBase | |
| _removeElement2ShopRelations ($sOxId) | |
| _isInList () | |
| _getTableFields ($sTable, $blReturnSimple=false) | |
| _initDataStructure ($blForceFullStructure=false) | |
| _getFieldLongName ($sFieldName) | |
| _setFieldData ($sFieldName, $sValue, $iDataType=oxField::T_TEXT) | |
| _getFieldDefaultValue ($sFieldName) | |
| _getUpdateFieldValue ($sFieldName, $oField) | |
| _isDisabledFieldCache () | |
| _addSkippedSaveFieldsForMapping () | |
| _disableLazyLoadingForCaching () | |
Protected Attributes | |
| $_sClassName = 'oxdiscount' | |
| $_dAmount = null | |
| $_sBasketIdent = null | |
| $_blIsForArticleOrForCategory = null | |
| $_aHasArticleDiscounts = array() | |
Protected Attributes inherited from oxI18n | |
| $_sClassName = 'oxI18n' | |
| $_iLanguage = null | |
| $_blEmployMultilanguage = true | |
Protected Attributes inherited from oxBase | |
| $_sOXID = null | |
| $_iShopId = null | |
| $_blIsSimplyClonable = true | |
| $_sClassName = 'oxbase' | |
| $_sCoreTable = null | |
| $_sViewTable = null | |
| $_aFieldNames = array('oxid' => 0) | |
| $_sCacheKey = null | |
| $_blUseLazyLoading = false | |
| $_aSkipSaveFields = array('oxtimestamp') | |
| $_blUseSkipSaveFields = true | |
| $_sExistKey = 'oxid' | |
| $_blIsDerived = null | |
| $_blIsSeoObject = false | |
| $_blUpdateSeo = true | |
| $_blReadOnly = false | |
| $_blIsInList = false | |
| $_isLoaded = false | |
| $_aInnerLazyCache = null | |
| $_blEmployMultilanguage = false | |
Additional Inherited Members | |
Static Protected Attributes inherited from oxBase | |
| static | $_blDisableFieldCaching = 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 48 of file oxdiscount.php.
|
protected |
Checks if discount may be applied according amounts info
| object | $oArticle | article object to chesk |
Definition at line 426 of file oxdiscount.php.
|
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 452 of file oxdiscount.php.
|
protected |
Checks whether this article is assigned to discount
| oxArticle | $oArticle |
Definition at line 472 of file oxdiscount.php.
|
protected |
Checks whether categories are assigned to discount
| array | $aCategoryIds |
Definition at line 492 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 61 of file oxdiscount.php.
| oxDiscount::getAbsValue | ( | $dPrice, | |
$dAmount = 1 |
|||
| ) |
Returns absolute discount value
| float | $dPrice | item price |
| float | int | $dAmount | item amount, interpretted only when discount is absolute (default 1) |
Definition at line 310 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 343 of file oxdiscount.php.
| oxDiscount::getAddSumType | ( | ) |
| oxDiscount::getArticleIds | ( | ) |
Returns article ids assigned to discount
Definition at line 403 of file oxdiscount.php.
| oxDiscount::getBundleAmount | ( | $dAmount | ) |
Returns amount of items to bundle
| double | $dAmount | item amount |
Definition at line 371 of file oxdiscount.php.
| oxDiscount::getCategoryIds | ( | ) |
Returns category ids asigned to discount
Definition at line 413 of file oxdiscount.php.
| oxDiscount::getPercentage | ( | $dPrice | ) |
Return discount percent
| decimal | $dPrice | - price from which calculates discount |
Definition at line 328 of file oxdiscount.php.
| oxDiscount::getSimpleDiscount | ( | ) |
Returns compact discount object which is used in oxbasket
Definition at line 388 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 212 of file oxdiscount.php.
| oxDiscount::isForArticle | ( | $oArticle | ) |
Checks if discount applies for article
| oxArticle | $oArticle | article object |
Definition at line 105 of file oxdiscount.php.
| oxDiscount::isForBasket | ( | $oBasket | ) |
Checks if discount is setup for whole basket
| object | $oBasket | basket object |
Definition at line 236 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 175 of file oxdiscount.php.
| oxDiscount::isForBasketItem | ( | $oArticle | ) |
Checks if discount is setup for some basket item
| object | $oArticle | basket item |
Definition at line 143 of file oxdiscount.php.
| oxDiscount::isForBundleBasket | ( | $oBasket | ) |
Checks if discount type is whole basket bundle discount
| object | $oBasket | basket object |
Definition at line 293 of file oxdiscount.php.
| oxDiscount::isForBundleItem | ( | $oArticle | ) |
Checks if discount type is bundle discount
| object | $oArticle | article object |
Definition at line 269 of file oxdiscount.php.
| oxDiscount::isGlobalDiscount | ( | ) |
Check for global discount (no articles, no categories)
Definition at line 82 of file oxdiscount.php.
|
protected |
Definition at line 43 of file oxdiscount.php.
|
protected |
Definition at line 36 of file oxdiscount.php.
|
protected |
Definition at line 22 of file oxdiscount.php.
|
protected |
Definition at line 29 of file oxdiscount.php.
|
protected |
Definition at line 15 of file oxdiscount.php.