source/Application/Controller/Admin/OrderList.php
protected function _prepareWhereQuery($whereQuery, $fullQuery)
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $query = parent::_prepareWhereQuery($whereQuery, $fullQuery);
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $folders = $config->getConfigParam('aOrderfolder');
        $folder = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('folder');
        // Searching for empty oxfolder fields
        if ($folder && $folder != '-1') {
            $query .= " and ( oxorder.oxfolder = " . $database->quote($folder) . " )";
        } elseif (!$folder && is_array($folders)) {
            $folderNames = array_keys($folders);
            $query .= " and ( oxorder.oxfolder = " . $database->quote($folderNames[0]) . " )";
        }

        return $query;
    }
protected function _prepareWhereQuery($whereQuery, $fullQuery)
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $query = parent::_prepareWhereQuery($whereQuery, $fullQuery);
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $folders = $config->getConfigParam('aOrderfolder');
        $folder = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('folder');
        // Searching for empty oxfolder fields
        if ($folder && $folder != '-1') {
            $query .= " and ( oxorder.oxfolder = " . $database->quote($folder) . " )";
        } elseif (!$folder && is_array($folders)) {
            $folderNames = array_keys($folders);
            $query .= " and ( oxorder.oxfolder = " . $database->quote($folderNames[0]) . " )";
        }

        return $query;
    }
protected function _prepareWhereQuery ( $ whereQuery , $ fullQuery ) { $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ query = parent :: _prepareWhereQuery ( $ whereQuery , $ fullQuery ) ; $ config = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ folders = $ config -> getConfigParam ( 'aOrderfolder' ) ; $ folder = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'folder' ) ; // Searching for empty oxfolder fields if ( $ folder && $ folder != '-1' ) { $ query .= " and ( oxorder.oxfolder = " . $ database -> quote ( $ folder ) . " )" ; } elseif ( ! $ folder && is_array ( $ folders ) ) { $ folderNames = array_keys ( $ folders ) ; $ query .= " and ( oxorder.oxfolder = " . $ database -> quote ( $ folderNames [ 0 ] ) . " )" ; } return $ query ; }
Adding folder check

@param array  $whereQuery SQL condition array
@param string $fullQuery  SQL query string

@return string
Adding folder check