Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

oxOrderArticle Class Reference

Inheritance diagram for oxOrderArticle:
Collaboration diagram for oxOrderArticle:

List of all members.

Public Member Functions

 __construct ()
 copyThis ($oProduct)
 assign ($dbRecord)
 updateArticleStock ($dAddAmount, $blAllowNegativeStock=false)
 getPersParams ()
 setPersParams ($aParams)
 loadInLang ($iLanguage, $sOxid)
 getProductId ()
 getProductParentId ()
 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 ()

Protected Member Functions

 _getArtStock ($dAddAmount=0, $blAllowNegativeStock=false)
 _setFieldData ($sFieldName, $sValue, $iDataType=oxField::T_TEXT)
 _setArticleParams ()
 _getOrderArticle ($sArticleId=null)

Protected Attributes

 $_sClassName = 'oxorderarticle'
 $_aPersParam = null
 $_aStatuses = null
 $_aOrderArticleSelList = null
 $_oOrderArticle = null
 $_blIsNewOrderItem = false

Static Protected Attributes

static $_aOrderCache = array()

Detailed Description

Order article manager. Performs copying of article.

Definition at line 7 of file oxorderarticle.php.


Constructor & Destructor Documentation

oxOrderArticle.__construct (  ) 

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

Definition at line 60 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 $dAddAmount amount which will be added/substracled from value in db
bool $blAllowNegativeStock allow/disallow negative stock value
Returns:
double

Definition at line 138 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 $sArticleId article id (optional, is not passed oxorderarticles__oxartid will be used)
Returns:
oxarticle | false

Definition at line 320 of file oxorderarticle.php.

oxOrderArticle._setArticleParams (  )  [protected]

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

Returns:
null

Definition at line 262 of file oxorderarticle.php.

oxOrderArticle._setFieldData ( sFieldName,
sValue,
iDataType = oxField::T_TEXT 
) [protected]

Sets data field value

Parameters:
string $sFieldName index OR name (eg. 'oxarticles__oxtitle') of a data field to set
string $sValue value of data field
int $iDataType field type
Returns:
null

Definition at line 199 of file oxorderarticle.php.

oxOrderArticle.assign ( dbRecord  ) 

Assigns DB field values to object fields.

Parameters:
string $dbRecord DB record
Returns:
null

Definition at line 93 of file oxorderarticle.php.

oxOrderArticle.cancelOrderArticle (  ) 

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

Returns:
null

Definition at line 567 of file oxorderarticle.php.

oxOrderArticle.checkForStock ( dAmount,
dArtStockAmount = 0 
)

Returns true, implements iBaseArticle interface method

Parameters:
double $dAmount stock to check
double $dArtStockAmount stock amount
Returns:
bool

Implements oxIArticle.

Definition at line 307 of file oxorderarticle.php.

oxOrderArticle.copyThis ( oProduct  ) 

Copies passed to method product into $this.

Parameters:
object $oProduct product to copy
Returns:
null

Definition at line 73 of file oxorderarticle.php.

oxOrderArticle.delete ( sOXID = null  ) 

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

Parameters:
string $sOXID Article id
Returns:
bool

Definition at line 586 of file oxorderarticle.php.

oxOrderArticle.getBasePrice ( dAmount = 1  ) 

Returns base article price from database

Parameters:
double $dAmount article amount. Default is 1
Returns:
double

Implements oxIArticle.

Definition at line 473 of file oxorderarticle.php.

oxOrderArticle.getBasketPrice ( dAmount,
aSelList,
oBasket 
)

Returns basket order article price

Parameters:
double $dAmount basket item amount
array $aSelList chosen selection list
oxbasket $oBasket basket
Returns:
oxprice

Implements oxIArticle.

Definition at line 424 of file oxorderarticle.php.

oxOrderArticle.getBrutPriceFormated (  ) 

Get brut price formated

Returns:
string

Definition at line 673 of file oxorderarticle.php.

oxOrderArticle.getCategoryIds ( blActCats = false,
blSkipCache = false 
)

Returns empty array, implements iBaseArticle interface getter method

Parameters:
bool $blActCats select categories if all parents are active
bool $blSkipCache force reload or not (default false - no reload)
Returns:
array

Implements oxIArticle.

Definition at line 447 of file oxorderarticle.php.

oxOrderArticle.getLanguage (  ) 

Returns current session language id

Returns:
int

Definition at line 461 of file oxorderarticle.php.

oxOrderArticle.getNetPriceFormated (  ) 

Get Net price formated

Returns:
string

Definition at line 686 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 699 of file oxorderarticle.php.

oxOrderArticle.getOrderArticleSelectList ( sArtId = null,
sOrderArtSelList = null 
)

Returns order article selection list array

Parameters:
string $sArtId ordered article id [optional]
string $sOrderArtSelList order article selection list [optional]
Returns:
array

Definition at line 358 of file oxorderarticle.php.

oxOrderArticle.getPersParams (  ) 

Order persistent data getter

Returns:
array

Definition at line 162 of file oxorderarticle.php.

oxOrderArticle.getPrice (  ) 

Returns order article unit price

Returns:
oxprice

Implements oxIArticle.

Definition at line 483 of file oxorderarticle.php.

oxOrderArticle.getProductId (  ) 

Returns ordered article id, implements iBaseArticle interface getter method

Returns:
string

Implements oxIArticle.

Definition at line 233 of file oxorderarticle.php.

oxOrderArticle.getProductParentId (  ) 

Returns product parent id (oxparentid)

Returns:
string

Implements oxIArticle.

Definition at line 243 of file oxorderarticle.php.

oxOrderArticle.getSelectLists ( sKeyPrefix = null  ) 

Returns article select lists, implements iBaseArticle interface method

Parameters:
string $sKeyPrefix prefix (not used)
Returns:
array

Implements oxIArticle.

Definition at line 341 of file oxorderarticle.php.

oxOrderArticle.getTotalBrutPriceFormated (  ) 

Get Total brut price formated

Returns:
string

Definition at line 660 of file oxorderarticle.php.

oxOrderArticle.getWrapping (  ) 

get used wrapping

Returns:
oxWrapping

Definition at line 634 of file oxorderarticle.php.

oxOrderArticle.isBundle (  ) 

Returns true if ordered product is bundle

Returns:
bool

Definition at line 650 of file oxorderarticle.php.

oxOrderArticle.isNewOrderItem (  ) 

Returns TRUE if current order article is newly added to order

Returns:
bool

Definition at line 511 of file oxorderarticle.php.

oxOrderArticle.isOrderArticle (  ) 

Returns true if object is derived from oxorderarticle class

Returns:
bool

Implements oxIArticle.

Definition at line 555 of file oxorderarticle.php.

oxOrderArticle.loadInLang ( iLanguage,
sOxid 
)

Executes oxOrderArticle.load() and returns its result

Parameters:
int $iLanguage language id
string $sOxid order article id
Returns:
bool

Definition at line 223 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

Definition at line 604 of file oxorderarticle.php.

oxOrderArticle.setIsNewOrderItem ( blIsNew  ) 

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

Parameters:
bool $blIsNew marker value - TRUE if this item is newy added to order
Returns:
null

Definition at line 501 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 $iNewAmount new ordered items amount
Returns:
null

Definition at line 525 of file oxorderarticle.php.

oxOrderArticle.setPersParams ( aParams  ) 

Order persistent params setter

Parameters:
array $aParams array of params
Returns:
null

Definition at line 182 of file oxorderarticle.php.

oxOrderArticle.skipDiscounts (  ) 

Returns false, implements iBaseArticle interface method

Returns:
bool

Implements oxIArticle.

Definition at line 434 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 $dAddAmount amount which will be substracled from value in db
bool $blAllowNegativeStock amount allow or not negative stock value
Returns:
null

Definition at line 109 of file oxorderarticle.php.


Member Data Documentation

oxOrderArticle.$_aOrderArticleSelList = null [protected]

Definition at line 41 of file oxorderarticle.php.

oxOrderArticle.$_aOrderCache = array() [static, protected]

Order cache

Definition at line 13 of file oxorderarticle.php.

oxOrderArticle.$_aPersParam = null [protected]

Definition at line 27 of file oxorderarticle.php.

oxOrderArticle.$_aStatuses = null [protected]

Definition at line 34 of file oxorderarticle.php.

oxOrderArticle.$_blIsNewOrderItem = false [protected]

Definition at line 55 of file oxorderarticle.php.

oxOrderArticle.$_oOrderArticle = null [protected]

Definition at line 48 of file oxorderarticle.php.

oxOrderArticle.$_sClassName = 'oxorderarticle' [protected]

Definition at line 20 of file oxorderarticle.php.


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