source/Application/Model/OrderArticle.php
public function getOrderArticleSelectList($sArtId = null, $sOrderArtSelList = null)
    {
        if ($this->_aOrderArticleSelList === null) {
            $sOrderArtSelList = $sOrderArtSelList ? $sOrderArtSelList : $this->oxorderarticles__oxselvariant->value;

            $sOrderArtSelList = explode(' || ', $sOrderArtSelList)[0];

            $aRet = [];

            if ($oArticle = $this->_getOrderArticle($sArtId)) {
                $aList = explode(", ", $sOrderArtSelList);
                $oStr = getStr();

                $aArticleSelList = $oArticle->getSelectLists();

                //formatting temporary list array from string
                if (count($aArticleSelList) > 0) {
                    foreach ($aList as $sList) {
                        if ($sList) {
                            $aVal = explode(":", $sList);
                            if (isset($aVal[0]) && isset($aVal[1])) {
                                $sOrderArtListTitle = $oStr->strtolower(trim($aVal[0]));
                                $sOrderArtSelValue = $oStr->strtolower(trim($aVal[1]));

                                //checking article list for matches with article list stored in oxOrderItem
                                $iSelListNum = 0;
                                foreach ($aArticleSelList as $aSelect) {
                                    //check if selects titles are equal

                                    if ($oStr->strtolower($aSelect['name']) == $sOrderArtListTitle) {
                                        //try to find matching select items value
                                        $iSelValueNum = 0;
                                        foreach ($aSelect as $oSel) {
                                            if ($oStr->strtolower($oSel->name) == $sOrderArtSelValue) {
                                                // found, adding to return array
                                                $aRet[$iSelListNum] = $iSelValueNum;
                                                break;
                                            }
                                            //next article list item
                                            $iSelValueNum++;
                                        }
                                    }
                                    //next article list
                                    $iSelListNum++;
                                }
                            }
                        }
                    }
                }
            }

            $this->_aOrderArticleSelList = $aRet;
        }

        return $this->_aOrderArticleSelList;
    }
public function getOrderArticleSelectList($sArtId = null, $sOrderArtSelList = null)
    {
        if ($this->_aOrderArticleSelList === null) {
            $sOrderArtSelList = $sOrderArtSelList ? $sOrderArtSelList : $this->oxorderarticles__oxselvariant->value;

            $sOrderArtSelList = explode(' || ', $sOrderArtSelList)[0];

            $aRet = [];

            if ($oArticle = $this->_getOrderArticle($sArtId)) {
                $aList = explode(", ", $sOrderArtSelList);
                $oStr = getStr();

                $aArticleSelList = $oArticle->getSelectLists();

                //formatting temporary list array from string
                if (count($aArticleSelList) > 0) {
                    foreach ($aList as $sList) {
                        if ($sList) {
                            $aVal = explode(":", $sList);
                            if (isset($aVal[0]) && isset($aVal[1])) {
                                $sOrderArtListTitle = $oStr->strtolower(trim($aVal[0]));
                                $sOrderArtSelValue = $oStr->strtolower(trim($aVal[1]));

                                //checking article list for matches with article list stored in oxOrderItem
                                $iSelListNum = 0;
                                foreach ($aArticleSelList as $aSelect) {
                                    //check if selects titles are equal

                                    if ($oStr->strtolower($aSelect['name']) == $sOrderArtListTitle) {
                                        //try to find matching select items value
                                        $iSelValueNum = 0;
                                        foreach ($aSelect as $oSel) {
                                            if ($oStr->strtolower($oSel->name) == $sOrderArtSelValue) {
                                                // found, adding to return array
                                                $aRet[$iSelListNum] = $iSelValueNum;
                                                break;
                                            }
                                            //next article list item
                                            $iSelValueNum++;
                                        }
                                    }
                                    //next article list
                                    $iSelListNum++;
                                }
                            }
                        }
                    }
                }
            }

            $this->_aOrderArticleSelList = $aRet;
        }

        return $this->_aOrderArticleSelList;
    }
public function getOrderArticleSelectList ( $ sArtId = null , $ sOrderArtSelList = null ) { if ( $ this -> _aOrderArticleSelList === null ) { $ sOrderArtSelList = $ sOrderArtSelList ? $ sOrderArtSelList : $ this -> oxorderarticles__oxselvariant -> value ; $ sOrderArtSelList = explode ( ' || ' , $ sOrderArtSelList ) [ 0 ] ; $ aRet = [ ] ; if ( $ oArticle = $ this -> _getOrderArticle ( $ sArtId ) ) { $ aList = explode ( ", " , $ sOrderArtSelList ) ; $ oStr = getStr ( ) ; $ aArticleSelList = $ oArticle -> getSelectLists ( ) ; //formatting temporary list array from string if ( count ( $ aArticleSelList ) > 0 ) { foreach ( $ aList as $ sList ) { if ( $ sList ) { $ aVal = explode ( ":" , $ sList ) ; if ( isset ( $ aVal [ 0 ] ) && isset ( $ aVal [ 1 ] ) ) { $ sOrderArtListTitle = $ oStr -> strtolower ( trim ( $ aVal [ 0 ] ) ) ; $ sOrderArtSelValue = $ oStr -> strtolower ( trim ( $ aVal [ 1 ] ) ) ; //checking article list for matches with article list stored in oxOrderItem $ iSelListNum = 0 ; foreach ( $ aArticleSelList as $ aSelect ) { //check if selects titles are equal if ( $ oStr -> strtolower ( $ aSelect [ 'name' ] ) == $ sOrderArtListTitle ) { //try to find matching select items value $ iSelValueNum = 0 ; foreach ( $ aSelect as $ oSel ) { if ( $ oStr -> strtolower ( $ oSel -> name ) == $ sOrderArtSelValue ) { // found, adding to return array $ aRet [ $ iSelListNum ] = $ iSelValueNum ; break ; } //next article list item $ iSelValueNum ++ ; } } //next article list $ iSelListNum ++ ; } } } } } } $ this -> _aOrderArticleSelList = $ aRet ; } return $ this -> _aOrderArticleSelList ; }
Returns order article selection list array

@param string $sArtId           ordered article id [optional]
@param string $sOrderArtSelList order article selection list [optional]

@return array
Returns order article selection list array