source/Application/Model/Article.php
public function getIconUrl($iIndex = 0)
    {
        $sImgName = false;
        $sDirname = "product/1/";
        if ($iIndex && !$this->_isFieldEmpty("oxarticles__oxpic{$iIndex}")) {
            $sImgName = basename($this->{"oxarticles__oxpic$iIndex"}->value);
            $sDirname = "product/{$iIndex}/";
        } elseif (!$this->_isFieldEmpty("oxarticles__oxicon")) {
            $sImgName = basename($this->oxarticles__oxicon->value);
            $sDirname = "product/icon/";
        } elseif (!$this->_isFieldEmpty("oxarticles__oxpic1")) {
            $sImgName = basename($this->oxarticles__oxpic1->value);
        }

        $sSize = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sIconsize');

        $sIconUrl = \OxidEsales\Eshop\Core\Registry::getPictureHandler()->getProductPicUrl($sDirname, $sImgName, $sSize, $iIndex);

        return $sIconUrl;
    }
public function getIconUrl($iIndex = 0)
    {
        $sImgName = false;
        $sDirname = "product/1/";
        if ($iIndex && !$this->_isFieldEmpty("oxarticles__oxpic{$iIndex}")) {
            $sImgName = basename($this->{"oxarticles__oxpic$iIndex"}->value);
            $sDirname = "product/{$iIndex}/";
        } elseif (!$this->_isFieldEmpty("oxarticles__oxicon")) {
            $sImgName = basename($this->oxarticles__oxicon->value);
            $sDirname = "product/icon/";
        } elseif (!$this->_isFieldEmpty("oxarticles__oxpic1")) {
            $sImgName = basename($this->oxarticles__oxpic1->value);
        }

        $sSize = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sIconsize');

        $sIconUrl = \OxidEsales\Eshop\Core\Registry::getPictureHandler()->getProductPicUrl($sDirname, $sImgName, $sSize, $iIndex);

        return $sIconUrl;
    }
public function getIconUrl ( $ iIndex = 0 ) { $ sImgName = false ; $ sDirname = "product/1/" ; if ( $ iIndex && ! $ this -> _isFieldEmpty ( "oxarticles__oxpic{$iIndex}" ) ) { $ sImgName = basename ( $ this -> { "oxarticles__oxpic$iIndex" } -> value ) ; $ sDirname = "product/{$iIndex}/" ; } elseif ( ! $ this -> _isFieldEmpty ( "oxarticles__oxicon" ) ) { $ sImgName = basename ( $ this -> oxarticles__oxicon -> value ) ; $ sDirname = "product/icon/" ; } elseif ( ! $ this -> _isFieldEmpty ( "oxarticles__oxpic1" ) ) { $ sImgName = basename ( $ this -> oxarticles__oxpic1 -> value ) ; } $ sSize = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'sIconsize' ) ; $ sIconUrl = \ OxidEsales \ Eshop \ Core \ Registry :: getPictureHandler ( ) -> getProductPicUrl ( $ sDirname , $ sImgName , $ sSize , $ iIndex ) ; return $ sIconUrl ; }
Returns article icon picture url. If no index specified, will
return main icon url.

@param int $iIndex picture index

@return string
Returns article icon picture url . If no index specified will return main icon url .