Public Member Functions | Protected Member Functions | Protected Attributes

oxVariantHandler Class Reference

Inheritance diagram for oxVariantHandler:
Collaboration diagram for oxVariantHandler:

List of all members.

Public Member Functions

 init ($oArticles)
 buildMdVariants ($oVariants, $sParentId)
 genVariantFromSell ($aSels, $oArticle)
 isMdVariant ($oArticle)

Protected Member Functions

 _assignValues ($aValues, $oVariants, $oArticle, $aConfLanguages)
 _getValuePrice ($oValue, $dParentPrice)
 _craeteNewVariant ($aParams=null, $sParentId=null)
 _updateArticleVarName ($sUpdate, $sArtId)

Protected Attributes

 $_oArticles = null
 $_sMdSeparator = " | "
 $_oMdVariants = null

Detailed Description

oxVariantHandler encapsulates methods dealing with multidimensional variant and variant names.

Definition at line 7 of file oxvarianthandler.php.


Member Function Documentation

oxVariantHandler._assignValues ( aValues,
oVariants,
oArticle,
aConfLanguages 
) [protected]

Assigns values of selection list to variants

Parameters:
array $aValues multilang values of selection list
object $oVariants variant list
object $oArticle parent article
array $aConfLanguages array of all active languages
Returns:
mixed

Definition at line 123 of file oxvarianthandler.php.

oxVariantHandler._craeteNewVariant ( aParams = null,
sParentId = null 
) [protected]

Creates new article variant.

Parameters:
array $aParams assigned parameters
string $sParentId parent article id
Returns:
null

Definition at line 236 of file oxvarianthandler.php.

oxVariantHandler._getValuePrice ( oValue,
dParentPrice 
) [protected]

Returns article price

Parameters:
object $oValue selection list value
double $dParentPrice parent article price
Returns:
double

Definition at line 209 of file oxvarianthandler.php.

oxVariantHandler._updateArticleVarName ( sUpdate,
sArtId 
) [protected]

Inserts article variant name for all languages

Parameters:
string $sUpdate query for update variant name
string $sArtId parent article id
Returns:
null

Definition at line 266 of file oxvarianthandler.php.

oxVariantHandler.buildMdVariants ( oVariants,
sParentId 
)

Returns multidimensional variant structure

Parameters:
object $oVariants all article variants
string $sParentId parent article id
Returns:
OxMdVariants

Definition at line 50 of file oxvarianthandler.php.

oxVariantHandler.genVariantFromSell ( aSels,
oArticle 
)

Generate variants from selection lists

Parameters:
array $aSels ids of selection list
object $oArticle parent article
Returns:
null

Definition at line 77 of file oxvarianthandler.php.

oxVariantHandler.init ( oArticles  ) 

Sets internal variant name array from article list.

Parameters:
oxList[string]oxArticle $oArticles Variant list as
Returns:
null

Definition at line 37 of file oxvarianthandler.php.

oxVariantHandler.isMdVariant ( oArticle  ) 

Check if variant is multidimensional

Parameters:
oxArticle $oArticle Article object
Returns:
bool

Definition at line 280 of file oxvarianthandler.php.


Member Data Documentation

oxVariantHandler.$_oArticles = null [protected]

Definition at line 14 of file oxvarianthandler.php.

oxVariantHandler.$_oMdVariants = null [protected]

Definition at line 28 of file oxvarianthandler.php.

oxVariantHandler.$_sMdSeparator = " | " [protected]

Definition at line 21 of file oxvarianthandler.php.


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