source/Application/Controller/Admin/DiscountItemAjax.php
protected function _getQueryCols()
    {
        $oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $sLangTag = \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageTag();

        $sQ = '';
        $blSep = false;
        $aVisiblecols = $this->_getVisibleColNames();
        foreach ($aVisiblecols as $iCnt => $aCol) {
            if ($blSep) {
                $sQ .= ', ';
            }
            $sViewTable = $this->_getViewName($aCol[1]);
            // multilanguage

            $sCol = $aCol[0];

            if ($oConfig->getConfigParam('blVariantsSelection') && $aCol[0] == 'oxtitle') {
                $sVarSelect = "$sViewTable.oxvarselect" . $sLangTag;
                $sQ .= " IF( $sViewTable.$sCol != '', $sViewTable.$sCol, CONCAT((select oxart.$sCol from $sViewTable as oxart where oxart.oxid = $sViewTable.oxparentid),', ',$sVarSelect)) as _" . $iCnt;
            } else {
                $sQ .= $sViewTable . '.' . $sCol . ' as _' . $iCnt;
            }

            $blSep = true;
        }

        $aIdentCols = $this->_getIdentColNames();
        foreach ($aIdentCols as $iCnt => $aCol) {
            if ($blSep) {
                $sQ .= ', ';
            }

            // multilanguage
            $sCol = $aCol[0];
            $sQ .= $this->_getViewName($aCol[1]) . '.' . $sCol . ' as _' . $iCnt;
        }

        return " $sQ ";
    }
protected function _getQueryCols()
    {
        $oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $sLangTag = \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageTag();

        $sQ = '';
        $blSep = false;
        $aVisiblecols = $this->_getVisibleColNames();
        foreach ($aVisiblecols as $iCnt => $aCol) {
            if ($blSep) {
                $sQ .= ', ';
            }
            $sViewTable = $this->_getViewName($aCol[1]);
            // multilanguage

            $sCol = $aCol[0];

            if ($oConfig->getConfigParam('blVariantsSelection') && $aCol[0] == 'oxtitle') {
                $sVarSelect = "$sViewTable.oxvarselect" . $sLangTag;
                $sQ .= " IF( $sViewTable.$sCol != '', $sViewTable.$sCol, CONCAT((select oxart.$sCol from $sViewTable as oxart where oxart.oxid = $sViewTable.oxparentid),', ',$sVarSelect)) as _" . $iCnt;
            } else {
                $sQ .= $sViewTable . '.' . $sCol . ' as _' . $iCnt;
            }

            $blSep = true;
        }

        $aIdentCols = $this->_getIdentColNames();
        foreach ($aIdentCols as $iCnt => $aCol) {
            if ($blSep) {
                $sQ .= ', ';
            }

            // multilanguage
            $sCol = $aCol[0];
            $sQ .= $this->_getViewName($aCol[1]) . '.' . $sCol . ' as _' . $iCnt;
        }

        return " $sQ ";
    }
protected function _getQueryCols ( ) { $ oConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ sLangTag = \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) -> getLanguageTag ( ) ; $ sQ = '' ; $ blSep = false ; $ aVisiblecols = $ this -> _getVisibleColNames ( ) ; foreach ( $ aVisiblecols as $ iCnt => $ aCol ) { if ( $ blSep ) { $ sQ .= ', ' ; } $ sViewTable = $ this -> _getViewName ( $ aCol [ 1 ] ) ; // multilanguage $ sCol = $ aCol [ 0 ] ; if ( $ oConfig -> getConfigParam ( 'blVariantsSelection' ) && $ aCol [ 0 ] == 'oxtitle' ) { $ sVarSelect = "$sViewTable.oxvarselect" . $ sLangTag ; $ sQ .= " IF( $sViewTable.$sCol != '', $sViewTable.$sCol, CONCAT((select oxart.$sCol from $sViewTable as oxart where oxart.oxid = $sViewTable.oxparentid),', ',$sVarSelect)) as _" . $ iCnt ; } else { $ sQ .= $ sViewTable . '.' . $ sCol . ' as _' . $ iCnt ; } $ blSep = true ; } $ aIdentCols = $ this -> _getIdentColNames ( ) ; foreach ( $ aIdentCols as $ iCnt => $ aCol ) { if ( $ blSep ) { $ sQ .= ', ' ; } // multilanguage $ sCol = $ aCol [ 0 ] ; $ sQ .= $ this -> _getViewName ( $ aCol [ 1 ] ) . '.' . $ sCol . ' as _' . $ iCnt ; } return " $sQ " ; }
Formats and returns chunk of SQL query string with definition of
fields to load from DB. Adds subselect to get variant title from parent article

@return string
Formats and returns chunk of SQL query string with definition of fields to load from DB . Adds subselect to get variant title from parent article