OXID eShop CE  6.3.0
function.oxvariantselect.php File Reference

Functions

 smarty_function_oxvariantselect ($params, &$smarty)
 
 oxvariantselect_addSubvariants ($oMdVariants, $iLevel, &$aSelectBoxes, &$aRealVariants, $sSeparator, $sCallMethod, $sArtId)
 
 oxvariantselect_formatSelectBox ($sId, $aOptions, $iLevel, $blVisible, $sSelected)
 
 oxvariantselect_formatJsSelecBoxesArray ($aSelectBoxes)
 
 oxvariantselect_formatJsRealVariantArray ($aRealVariants)
 

Function Documentation

◆ oxvariantselect_addSubvariants()

oxvariantselect_addSubvariants (   $oMdVariants,
  $iLevel,
$aSelectBoxes,
$aRealVariants,
  $sSeparator,
  $sCallMethod,
  $sArtId 
)

Recursiovely adds selection box of for subvariants

Parameters
array[string]OxMdVariant$oMdVariants Variant list
int$iLevelDepth level
array[int][int]string&$aSelectBoxes Cummulative array of select boxes
array[string]string&$aRealVariants Cummulative array or real variants
string$sSeparatorSeparator placed between select boxes
string$sCallMethodMethod to be called to display the variant
string$sArtIdDefault selected article Id
Returns
string

◆ oxvariantselect_formatJsRealVariantArray()

oxvariantselect_formatJsRealVariantArray (   $aRealVariants)

Formats Real Variant array in JavaScritp format

Parameters
array[string]string$aRealVariants Select box array
Returns
string

◆ oxvariantselect_formatJsSelecBoxesArray()

oxvariantselect_formatJsSelecBoxesArray (   $aSelectBoxes)

Formats Select Box array in JavaScritp format

Parameters
array[int][int]string$aSelectBoxes Select box array
Returns
string

◆ oxvariantselect_formatSelectBox()

oxvariantselect_formatSelectBox (   $sId,
  $aOptions,
  $iLevel,
  $blVisible,
  $sSelected 
)

Formats variant select box

Parameters
string$sIdSelect box id
array[string]string$aOptions Select box options
int$iLevelLevel information (counted from 0)
bool$blVisibleInitial select list visibility
string$sSelectedSelected variant
Returns
string

◆ smarty_function_oxvariantselect()

smarty_function_oxvariantselect (   $params,
$smarty 
)

Copyright © OXID eSales AG. All rights reserved. See LICENSE file for license details.

Smarty function

Purpose: outputs HTML and JavaScript selectboxes for MD variant management call example:

[{oxvariantselect value=$product->getMdVariants() separator=" " artid=$product->getId()}]

Parameters
array$paramsparams
Smarty&$smartyclever simulation of a method
Returns
string