Public Member Functions | |
init ($oArticles) | |
buildMdVariants ($oVariants, $sParentId) | |
genVariantFromSell ($aSels, $oArticle) | |
isMdVariant ($oArticle) | |
buildVariantSelections ($sVarName, $oVariantList, $aFilter, $sActVariantId, $iLimit=0) | |
Protected Member Functions | |
_assignValues ($aValues, $oVariants, $oArticle, $aConfLanguages) | |
_getValuePrice ($oValue, $dParentPrice) | |
_createNewVariant ($aParams=null, $sParentId=null) | |
_updateArticleVarName ($sUpdate, $sArtId) | |
_fillVariantSelections ($oVariantList, $iVarSelCnt, &$aFilter, $sActVariantId) | |
_cleanFilter ($aFilter) | |
_applyVariantSelectionsFilter ($aSelections, $aFilter) | |
_buildVariantSelectionsList ($aVarSelects, $aSelections) | |
_getSelections ($sTitle) | |
Protected Attributes | |
$_oArticles = null | |
$_sMdSeparator = " | " | |
$_oMdVariants = null |
oxVariantHandler encapsulates methods dealing with multidimensional variant and variant names.
Definition at line 7 of file oxvarianthandler.php.
oxVariantHandler._applyVariantSelectionsFilter | ( | $ | aSelections, | |
$ | aFilter | |||
) | [protected] |
Applies filter on variant selection array
array | $aSelections selections | |
array | $aFilter filter |
Definition at line 356 of file oxvarianthandler.php.
oxVariantHandler._assignValues | ( | $ | aValues, | |
$ | oVariants, | |||
$ | oArticle, | |||
$ | aConfLanguages | |||
) | [protected] |
Assigns values of selection list to variants
array | $aValues multilang values of selection list | |
object | $oVariants variant list | |
object | $oArticle parent article | |
array | $aConfLanguages array of all active languages |
Definition at line 124 of file oxvarianthandler.php.
oxVariantHandler._buildVariantSelectionsList | ( | $ | aVarSelects, | |
$ | aSelections | |||
) | [protected] |
Builds variant selections list - array containing oxVariantSelectList
array | $aVarSelects variant selection titles | |
array | $aSelections variant selections |
Definition at line 406 of file oxvarianthandler.php.
oxVariantHandler._cleanFilter | ( | $ | aFilter | ) | [protected] |
Cleans up user given filter. If filter was empty - returns false
array | $aFilter user given filter |
Definition at line 334 of file oxvarianthandler.php.
oxVariantHandler._createNewVariant | ( | $ | aParams = null , |
|
$ | sParentId = null | |||
) | [protected] |
Creates new article variant.
array | $aParams assigned parameters | |
string | $sParentId parent article id |
Definition at line 234 of file oxvarianthandler.php.
oxVariantHandler._fillVariantSelections | ( | $ | oVariantList, | |
$ | iVarSelCnt, | |||
&$ | aFilter, | |||
$ | sActVariantId | |||
) | [protected] |
Creates array/matrix with variant selections
oxArticleList | $oVariantList variant list | |
int | $iVarSelCnt possible variant selection count | |
array | &$aFilter active filter array | |
string | $sActVariantId active variant id |
Definition at line 300 of file oxvarianthandler.php.
oxVariantHandler._getSelections | ( | $ | sTitle | ) | [protected] |
In case multidimentional variants ON explodes title by _sMdSeparator and returns array, else - returns array containing title
string | $sTitle title to process |
Definition at line 431 of file oxvarianthandler.php.
oxVariantHandler._getValuePrice | ( | $ | oValue, | |
$ | dParentPrice | |||
) | [protected] |
Returns article price
object | $oValue selection list value | |
double | $dParentPrice parent article price |
Definition at line 207 of file oxvarianthandler.php.
oxVariantHandler._updateArticleVarName | ( | $ | sUpdate, | |
$ | sArtId | |||
) | [protected] |
Inserts article variant name for all languages
string | $sUpdate query for update variant name | |
string | $sArtId parent article id |
Definition at line 265 of file oxvarianthandler.php.
oxVariantHandler.buildMdVariants | ( | $ | oVariants, | |
$ | sParentId | |||
) |
Returns multidimensional variant structure
object | $oVariants all article variants | |
string | $sParentId parent article id |
Definition at line 50 of file oxvarianthandler.php.
oxVariantHandler.buildVariantSelections | ( | $ | sVarName, | |
$ | oVariantList, | |||
$ | aFilter, | |||
$ | sActVariantId, | |||
$ | iLimit = 0 | |||
) |
Builds variant selection list
string | $sVarName product (parent product) oxvarname value | |
oxarticlelist | $oVariantList variant list | |
array | $aFilter variant filter | |
string | $sActVariantId active variant id | |
int | $iLimit limit variant lists count (if non zero, return limited number of multidimensional variant selections) |
Definition at line 453 of file oxvarianthandler.php.
oxVariantHandler.genVariantFromSell | ( | $ | aSels, | |
$ | oArticle | |||
) |
Generate variants from selection lists
array | $aSels ids of selection list | |
object | $oArticle parent article |
Definition at line 77 of file oxvarianthandler.php.
oxVariantHandler.init | ( | $ | oArticles | ) |
Sets internal variant name array from article list.
oxList[string]oxArticle | $oArticles Variant list as |
Definition at line 37 of file oxvarianthandler.php.
oxVariantHandler.isMdVariant | ( | $ | oArticle | ) |
Check if variant is multidimensional
Definition at line 279 of file oxvarianthandler.php.
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.