source/Application/Model/Article.php
protected function _setVarMinMaxPrice($sParentId)
    {
        if ($sParentId) {
            $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
            $sQ = '
                SELECT
                    MIN( IF( `oxarticles`.`oxprice` > 0, `oxarticles`.`oxprice`, `p`.`oxprice` ) ) AS `varminprice`,
                    MAX( IF( `oxarticles`.`oxprice` > 0, `oxarticles`.`oxprice`, `p`.`oxprice` ) ) AS `varmaxprice`
                FROM ' . $this->getViewName(true) . ' AS `oxarticles`
                    LEFT JOIN ' . $this->getViewName(true) . ' AS `p` ON ( `p`.`oxid` = `oxarticles`.`oxparentid` AND `p`.`oxprice` > 0 )
                WHERE ' . $this->getSqlActiveSnippet(true) . '
                    AND ( `oxarticles`.`oxparentid` = ' . $database->quote($sParentId) . ' )';
            $aPrices = $database->getRow($sQ);
            if (isset($aPrices['varminprice'], $aPrices['varmaxprice'])) {
                $sQ = '
                    UPDATE `oxarticles`
                    SET
                        `oxvarminprice` = ' . $database->quote($aPrices['varminprice']) . ',
                        `oxvarmaxprice` = ' . $database->quote($aPrices['varmaxprice']) . '
                    WHERE
                        `oxid` = ' . $database->quote($sParentId);
            } else {
                $sQ = '
                    UPDATE `oxarticles`
                    SET
                        `oxvarminprice` = `oxprice`,
                        `oxvarmaxprice` = `oxprice`
                    WHERE
                        `oxid` = ' . $database->quote($sParentId);
            }
            $database->execute($sQ);
        }
    }
protected function _setVarMinMaxPrice($sParentId)
    {
        if ($sParentId) {
            $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
            $sQ = '
                SELECT
                    MIN( IF( `oxarticles`.`oxprice` > 0, `oxarticles`.`oxprice`, `p`.`oxprice` ) ) AS `varminprice`,
                    MAX( IF( `oxarticles`.`oxprice` > 0, `oxarticles`.`oxprice`, `p`.`oxprice` ) ) AS `varmaxprice`
                FROM ' . $this->getViewName(true) . ' AS `oxarticles`
                    LEFT JOIN ' . $this->getViewName(true) . ' AS `p` ON ( `p`.`oxid` = `oxarticles`.`oxparentid` AND `p`.`oxprice` > 0 )
                WHERE ' . $this->getSqlActiveSnippet(true) . '
                    AND ( `oxarticles`.`oxparentid` = ' . $database->quote($sParentId) . ' )';
            $aPrices = $database->getRow($sQ);
            if (isset($aPrices['varminprice'], $aPrices['varmaxprice'])) {
                $sQ = '
                    UPDATE `oxarticles`
                    SET
                        `oxvarminprice` = ' . $database->quote($aPrices['varminprice']) . ',
                        `oxvarmaxprice` = ' . $database->quote($aPrices['varmaxprice']) . '
                    WHERE
                        `oxid` = ' . $database->quote($sParentId);
            } else {
                $sQ = '
                    UPDATE `oxarticles`
                    SET
                        `oxvarminprice` = `oxprice`,
                        `oxvarmaxprice` = `oxprice`
                    WHERE
                        `oxid` = ' . $database->quote($sParentId);
            }
            $database->execute($sQ);
        }
    }
protected function _setVarMinMaxPrice ( $ sParentId ) { if ( $ sParentId ) { $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: FETCH_MODE_ASSOC ) ; $ sQ = '
                SELECT
                    MIN( IF( `oxarticles`.`oxprice` > 0, `oxarticles`.`oxprice`, `p`.`oxprice` ) ) AS `varminprice`,
                    MAX( IF( `oxarticles`.`oxprice` > 0, `oxarticles`.`oxprice`, `p`.`oxprice` ) ) AS `varmaxprice`
                FROM ' . $ this -> getViewName ( true ) . ' AS `oxarticles`
                    LEFT JOIN ' . $ this -> getViewName ( true ) . ' AS `p` ON ( `p`.`oxid` = `oxarticles`.`oxparentid` AND `p`.`oxprice` > 0 )
                WHERE ' . $ this -> getSqlActiveSnippet ( true ) . '
                    AND ( `oxarticles`.`oxparentid` = ' . $ database -> quote ( $ sParentId ) . ' )' ; $ aPrices = $ database -> getRow ( $ sQ ) ; if ( isset ( $ aPrices [ 'varminprice' ] , $ aPrices [ 'varmaxprice' ] ) ) { $ sQ = '
                    UPDATE `oxarticles`
                    SET
                        `oxvarminprice` = ' . $ database -> quote ( $ aPrices [ 'varminprice' ] ) . ',
                        `oxvarmaxprice` = ' . $ database -> quote ( $ aPrices [ 'varmaxprice' ] ) . '
                    WHERE
                        `oxid` = ' . $ database -> quote ( $ sParentId ) ; } else { $ sQ = '
                    UPDATE `oxarticles`
                    SET
                        `oxvarminprice` = `oxprice`,
                        `oxvarmaxprice` = `oxprice`
                    WHERE
                        `oxid` = ' . $ database -> quote ( $ sParentId ) ; } $ database -> execute ( $ sQ ) ; } }
Updates variant min price. This method is supposed to be called on article change trigger.

@param string $sParentId Parent ID
Updates variant min price . This method is supposed to be called on article change trigger .