OXID eShop CE  4.9.7
 All Classes Files Functions Variables Pages
oxOrderArticle Class Reference
+ Inheritance diagram for oxOrderArticle:
+ Collaboration diagram for oxOrderArticle:

Public Member Functions

 __construct ()
 copyThis ($oProduct)
 assign ($dbRecord)
 updateArticleStock ($dAddAmount, $blAllowNegativeStock=false)
 getPersParams ()
 setPersParams ($aParams)
 loadInLang ($iLanguage, $sOxid)
 getProductId ()
 getProductParentId ()
 getParentId ()
 checkForStock ($dAmount, $dArtStockAmount=0)
 getSelectLists ($sKeyPrefix=null)
 getOrderArticleSelectList ($sArtId=null, $sOrderArtSelList=null)
 getBasketPrice ($dAmount, $aSelList, $oBasket)
 skipDiscounts ()
 getCategoryIds ($blActCats=false, $blSkipCache=false)
 getLanguage ()
 getBasePrice ($dAmount=1)
 getPrice ()
 setIsNewOrderItem ($blIsNew)
 isNewOrderItem ()
 setNewAmount ($iNewAmount)
 isOrderArticle ()
 cancelOrderArticle ()
 delete ($sOXID=null)
 save ()
 getWrapping ()
 isBundle ()
 getTotalBrutPriceFormated ()
 getBrutPriceFormated ()
 getNetPriceFormated ()
 getOrder ()
 setArticle ($oArticle)
 getArticle ()
 _setOrderFiles ()
 getTotalNetPriceFormated ()
- 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)
 getClassName ()
 getCoreTableName ()
 getId ()
 setId ($sOXID=null)
 setShopId ($iShopId)
 getShopId ()
 getViewName ($blForceCoreTableUsage=null)
 modifyCacheKey ($sCacheKey, $blOverride=false)
 disableLazyLoading ()
 isDerived ()
 setIsDerived ($blVal)
 isMultilang ()
 load ($sOXID)
 isLoaded ()
 buildSelectString ($aWhere=null)
 assignRecord ($sSelect)
 getFieldData ($sFieldName)
 getSelectFields ($blForceCoreTableUsage=null)
 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

 _getArtStock ($dAddAmount=0, $blAllowNegativeStock=false)
 _setFieldData ($sFieldName, $sValue, $iDataType=oxField::T_TEXT)
 _setArticleParams ()
 _getOrderArticle ($sArticleId=null)
 _insert ()
- Protected Member Functions inherited from oxBase
 _setUpdateSeoOnFieldChange ($sField)
 _removeElement2ShopRelations ($sOxId)
 _isInList ()
 _getObjectViewName ($sTable, $sShopID=null)
 _getTableFields ($sTable, $blReturnSimple=false)
 _getAllFields ($blReturnSimple=false)
 _initDataStructure ($blForceFullStructure=false)
 _getNonCachedFieldNames ($blForceFullStructure=false)
 _getFieldStatus ($sFieldName)
 _addField ($sName, $iStatus, $sType=null, $sLength=null)
 _getFieldLongName ($sFieldName)
 _canFieldBeNull ($sFieldName)
 _getFieldDefaultValue ($sFieldName)
 _getUpdateFieldValue ($sFieldName, $oField)
 _getUpdateFields ($blUseSkipSaveFields=true)
 _update ()
 _isDisabledFieldCache ()
 _addSkippedSaveFieldsForMapping ()
 _disableLazyLoadingForCaching ()

Protected Attributes

 $_sClassName = 'oxorderarticle'
 $_aPersParam = null
 $_aStatuses = null
 $_aOrderArticleSelList = null
 $_oOrderArticle = null
 $_oArticle = null
 $_blIsNewOrderItem = false
 $_aSkipSaveFields = array('oxtimestamp')
- 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

Static Protected Attributes

static $_aOrderCache = array()
- Static Protected Attributes inherited from oxBase
static $_blDisableFieldCaching = array()
- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Order article manager. Performs copying of article.

Definition at line 8 of file oxorderarticle.php.

Constructor & Destructor Documentation

oxOrderArticle::__construct ( )

Class constructor, initiates class constructor (parent::oxbase()).

Reimplemented from oxBase.

Definition at line 76 of file oxorderarticle.php.

Member Function Documentation

oxOrderArticle::_getArtStock (   $dAddAmount = 0,
  $blAllowNegativeStock = false 
)
protected

Adds or substracts defined amount passed by param from arcticle stock

Parameters
double$dAddAmountamount which will be added/substracled from value in db
bool$blAllowNegativeStockallow/disallow negative stock value
Returns
double

Definition at line 157 of file oxorderarticle.php.

oxOrderArticle::_getOrderArticle (   $sArticleId = null)
protected

Loads, caches and returns real order article instance. If article is not available (deleted from db or so) false is returned

Parameters
string$sArticleIdarticle id (optional, is not passed oxorderarticles__oxartid will be used)
Returns
oxarticle | false

Definition at line 349 of file oxorderarticle.php.

oxOrderArticle::_insert ( )
protected

Sets article creation date (oxorderarticle::oxorderarticles__oxtimestamp). Then executes parent method parent::_insert() and returns insertion status.

Returns
bool

Reimplemented from oxBase.

Definition at line 765 of file oxorderarticle.php.

oxOrderArticle::_setArticleParams ( )
protected

Sets article parameters to current object, so this object can be used for basket calculation

Definition at line 291 of file oxorderarticle.php.

oxOrderArticle::_setFieldData (   $sFieldName,
  $sValue,
  $iDataType = oxField::T_TEXT 
)
protected

Sets data field value

Parameters
string$sFieldNameindex OR name (eg. 'oxarticles__oxtitle') of a data field to set
string$sValuevalue of data field
int$iDataTypefield type
Returns
null

Reimplemented from oxBase.

Definition at line 216 of file oxorderarticle.php.

oxOrderArticle::_setOrderFiles ( )

Set order files

Definition at line 805 of file oxorderarticle.php.

oxOrderArticle::assign (   $dbRecord)

Assigns DB field values to object fields.

Parameters
string$dbRecordDB record

Reimplemented from oxBase.

Definition at line 113 of file oxorderarticle.php.

oxOrderArticle::cancelOrderArticle ( )

Sets order article storno value to 1 and if stock control is on - restores previous oxarticle stock state

Definition at line 600 of file oxorderarticle.php.

oxOrderArticle::checkForStock (   $dAmount,
  $dArtStockAmount = 0 
)

Returns true, implements iBaseArticle interface method

Parameters
double$dAmountstock to check
double$dArtStockAmountstock amount
Returns
bool

Implements oxIArticle.

Definition at line 336 of file oxorderarticle.php.

oxOrderArticle::copyThis (   $oProduct)

Copies passed to method product into $this.

Parameters
object$oProductproduct to copy

Definition at line 87 of file oxorderarticle.php.

oxOrderArticle::delete (   $sOXID = null)

Deletes order article object. If deletion succeded - updates article stock information. Returns deletion status

Parameters
string$sOXIDArticle id
Returns
bool

Reimplemented from oxBase.

Definition at line 619 of file oxorderarticle.php.

oxOrderArticle::getArticle ( )

Get article

Returns
oxArticle

Definition at line 790 of file oxorderarticle.php.

oxOrderArticle::getBasePrice (   $dAmount = 1)

Returns base article price from database

Parameters
double$dAmountarticle amount. Default is 1
Returns
object

Implements oxIArticle.

Definition at line 511 of file oxorderarticle.php.

oxOrderArticle::getBasketPrice (   $dAmount,
  $aSelList,
  $oBasket 
)

Returns basket order article price

Parameters
double$dAmountbasket item amount
array$aSelListchosen selection list
oxbasket$oBasketbasket
Returns
oxprice

Implements oxIArticle.

Definition at line 455 of file oxorderarticle.php.

oxOrderArticle::getBrutPriceFormated ( )

Get brut price formated

Returns
string

Definition at line 712 of file oxorderarticle.php.

oxOrderArticle::getCategoryIds (   $blActCats = false,
  $blSkipCache = false 
)

Returns empty array, implements iBaseArticle interface getter method

Parameters
bool$blActCatsselect categories if all parents are active
bool$blSkipCacheforce reload or not (default false - no reload)
Returns
array

Implements oxIArticle.

Definition at line 484 of file oxorderarticle.php.

oxOrderArticle::getLanguage ( )

Returns current session language id

Returns
int

Reimplemented from oxBase.

Definition at line 499 of file oxorderarticle.php.

oxOrderArticle::getNetPriceFormated ( )

Get Net price formated

Returns
string

Definition at line 726 of file oxorderarticle.php.

oxOrderArticle::getOrder ( )

Returns oxOrder object that the article belongs to

Returns
mixed - on success returns oxOrder object, else returns null

Definition at line 740 of file oxorderarticle.php.

oxOrderArticle::getOrderArticleSelectList (   $sArtId = null,
  $sOrderArtSelList = null 
)

Returns order article selection list array

Parameters
string$sArtIdordered article id [optional]
string$sOrderArtSelListorder article selection list [optional]
Returns
array

Definition at line 390 of file oxorderarticle.php.

oxOrderArticle::getParentId ( )

Returns product parent id

Returns
string

Definition at line 273 of file oxorderarticle.php.

oxOrderArticle::getPersParams ( )

Order persistent data getter

Returns
array

Definition at line 181 of file oxorderarticle.php.

oxOrderArticle::getPrice ( )

Returns order article unit price

Returns
oxprice

Implements oxIArticle.

Definition at line 522 of file oxorderarticle.php.

oxOrderArticle::getProductId ( )

Returns ordered article id, implements iBaseArticle interface getter method

Returns
string

Implements oxIArticle.

Definition at line 251 of file oxorderarticle.php.

oxOrderArticle::getProductParentId ( )

Returns product parent id

Deprecated:
since v5.2.0/4.9.0 (2014-06-30); use getParentId
Returns
string

Definition at line 263 of file oxorderarticle.php.

oxOrderArticle::getSelectLists (   $sKeyPrefix = null)

Returns article select lists, implements iBaseArticle interface method

Parameters
string$sKeyPrefixprefix (not used)
Returns
array

Implements oxIArticle.

Definition at line 372 of file oxorderarticle.php.

oxOrderArticle::getTotalBrutPriceFormated ( )

Get Total brut price formated

Returns
string

Definition at line 698 of file oxorderarticle.php.

oxOrderArticle::getTotalNetPriceFormated ( )

Get Total brut price formated

Returns
string

Definition at line 846 of file oxorderarticle.php.

oxOrderArticle::getWrapping ( )

get used wrapping

Returns
oxWrapping

Definition at line 671 of file oxorderarticle.php.

oxOrderArticle::isBundle ( )

Returns true if ordered product is bundle

Returns
bool

Definition at line 688 of file oxorderarticle.php.

oxOrderArticle::isNewOrderItem ( )

Returns TRUE if current order article is newly added to order

Returns
bool

Definition at line 548 of file oxorderarticle.php.

oxOrderArticle::isOrderArticle ( )

Returns true if object is derived from oxorderarticle class

Returns
bool

Implements oxIArticle.

Definition at line 590 of file oxorderarticle.php.

oxOrderArticle::loadInLang (   $iLanguage,
  $sOxid 
)

Executes oxOrderArticle::load() and returns its result

Parameters
int$iLanguagelanguage id
string$sOxidorder article id
Returns
bool

Definition at line 241 of file oxorderarticle.php.

oxOrderArticle::save ( )

Saves order article object. If saving succeded - updates article stock information if oxOrderArticle::isNewOrderItem() returns TRUE. Returns saving status

Returns
bool

Reimplemented from oxBase.

Definition at line 638 of file oxorderarticle.php.

oxOrderArticle::setArticle (   $oArticle)

Set article

Parameters
object$oArticle- article object

Definition at line 780 of file oxorderarticle.php.

oxOrderArticle::setIsNewOrderItem (   $blIsNew)

Marks object as new order item (this marker useful when recalculating stocks after order recalculation)

Parameters
bool$blIsNewmarker value - TRUE if this item is newy added to order

Definition at line 538 of file oxorderarticle.php.

oxOrderArticle::setNewAmount (   $iNewAmount)

Ordered article stock setter. Before setting new stock value additionally checks for original article stock value. Is stock values <= preferred, adjusts order stock according to it

Parameters
int$iNewAmountnew ordered items amount

Definition at line 560 of file oxorderarticle.php.

oxOrderArticle::setPersParams (   $aParams)

Order persistent params setter

Parameters
array$aParamsarray of params

Definition at line 199 of file oxorderarticle.php.

oxOrderArticle::skipDiscounts ( )

Returns false, implements iBaseArticle interface method

Returns
bool

Implements oxIArticle.

Definition at line 471 of file oxorderarticle.php.

oxOrderArticle::updateArticleStock (   $dAddAmount,
  $blAllowNegativeStock = false 
)

Performs stock modification for current order article. Additionally executes changeable article onChange/updateSoldAmount methods to update chained data

Parameters
double$dAddAmountamount which will be substracled from value in db
bool$blAllowNegativeStockamount allow or not negative stock value

Definition at line 127 of file oxorderarticle.php.

Member Data Documentation

oxOrderArticle::$_aOrderArticleSelList = null
protected

Definition at line 42 of file oxorderarticle.php.

oxOrderArticle::$_aOrderCache = array()
staticprotected

Order cache

Definition at line 14 of file oxorderarticle.php.

oxOrderArticle::$_aPersParam = null
protected

Definition at line 28 of file oxorderarticle.php.

oxOrderArticle::$_aSkipSaveFields = array('oxtimestamp')
protected

Definition at line 71 of file oxorderarticle.php.

oxOrderArticle::$_aStatuses = null
protected

Definition at line 35 of file oxorderarticle.php.

oxOrderArticle::$_blIsNewOrderItem = false
protected

Definition at line 63 of file oxorderarticle.php.

oxOrderArticle::$_oArticle = null
protected

Definition at line 56 of file oxorderarticle.php.

oxOrderArticle::$_oOrderArticle = null
protected

Definition at line 49 of file oxorderarticle.php.

oxOrderArticle::$_sClassName = 'oxorderarticle'
protected

Definition at line 21 of file oxorderarticle.php.


The documentation for this class was generated from the following file: