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) |
Detailed Description
oxVariantHandler encapsulates methods dealing with multidimensional variant and variant names.
Definition at line 7 of file oxvarianthandler.php.
Member Function Documentation
oxVariantHandler::_applyVariantSelectionsFilter |
( |
|
$aSelections, |
|
|
|
$aFilter |
|
) |
| |
|
protected |
Applies filter on variant selection array
- Parameters
-
array | $aSelections | selections |
array | $aFilter | filter |
- Returns
- array
Definition at line 354 of file oxvarianthandler.php.
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::_buildVariantSelectionsList |
( |
|
$aVarSelects, |
|
|
|
$aSelections |
|
) |
| |
|
protected |
Builds variant selections list - array containing oxVariantSelectList
- Parameters
-
array | $aVarSelects | variant selection titles |
array | $aSelections | variant selections |
- Returns
- array
Definition at line 405 of file oxvarianthandler.php.
oxVariantHandler::_cleanFilter |
( |
|
$aFilter | ) |
|
|
protected |
Cleans up user given filter. If filter was empty - returns false
- Parameters
-
array | $aFilter | user given filter |
- Returns
- array | bool
Definition at line 332 of file oxvarianthandler.php.
oxVariantHandler::_createNewVariant |
( |
|
$aParams = null , |
|
|
|
$sParentId = null |
|
) |
| |
|
protected |
Creates new article variant.
- Parameters
-
array | $aParams | assigned parameters |
string | $sParentId | parent article id |
- Returns
- null
Definition at line 237 of file oxvarianthandler.php.
oxVariantHandler::_fillVariantSelections |
( |
|
$oVariantList, |
|
|
|
$iVarSelCnt, |
|
|
& |
$aFilter, |
|
|
|
$sActVariantId |
|
) |
| |
|
protected |
Creates array/matrix with variant selections
- Parameters
-
oxArticleList | $oVariantList | variant list |
int | $iVarSelCnt | possible variant selection count |
array | &$aFilter | active filter array |
string | $sActVariantId | active variant id |
- Returns
- array
Definition at line 298 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
- Parameters
-
string | $sTitle | title to process |
- Returns
- array
Definition at line 430 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 |
Definition at line 263 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 49 of file oxvarianthandler.php.
oxVariantHandler::buildVariantSelections |
( |
|
$sVarName, |
|
|
|
$oVariantList, |
|
|
|
$aFilter, |
|
|
|
$sActVariantId, |
|
|
|
$iLimit = 0 |
|
) |
| |
Builds variant selection list
- Parameters
-
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) |
- Returns
- Ambigous false | array
Definition at line 453 of file oxvarianthandler.php.
oxVariantHandler::genVariantFromSell |
( |
|
$aSels, |
|
|
|
$oArticle |
|
) |
| |
Generate variants from selection lists
- Parameters
-
array | $aSels | ids of selection list |
object | $oArticle | parent article |
Definition at line 76 of file oxvarianthandler.php.
oxVariantHandler::init |
( |
|
$oArticles | ) |
|
Sets internal variant name array from article list.
- Parameters
-
array | $oArticles | Variant list |
Definition at line 36 of file oxvarianthandler.php.
oxVariantHandler::isMdVariant |
( |
|
$oArticle | ) |
|
Member Data Documentation
oxVariantHandler::$_oArticles = null |
|
protected |
oxVariantHandler::$_oMdVariants = null |
|
protected |
oxVariantHandler::$_sMdSeparator = " | " |
|
protected |
The documentation for this class was generated from the following file: