source/Application/Controller/Admin/PriceAlarmSend.php
protected function sendPriceChangeNotifications($start, $limit)
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $shopId = $config->getShopId();

        $alarmsQuery =
            "SELECT oxid, oxemail, oxartid, oxprice FROM oxpricealarm
            WHERE oxsended = '000-00-00 00:00:00' AND oxshopid = '$shopId'";
        $result = $database->selectLimit($alarmsQuery, $limit, $start);
        while ($result != false && !$result->EOF) {
            $article = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
            $article->load($result->fields['oxartid']);
            if ($article->getPrice()->getBruttoPrice() <= $result->fields['oxprice']) {
                $this->sendeMail(
                    $result->fields['oxemail'],
                    $result->fields['oxartid'],
                    $result->fields['oxid'],
                    $result->fields['oxprice']
                );
            }
            $result->fetchRow();
        }
    }
protected function sendPriceChangeNotifications($start, $limit)
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $shopId = $config->getShopId();

        $alarmsQuery =
            "SELECT oxid, oxemail, oxartid, oxprice FROM oxpricealarm
            WHERE oxsended = '000-00-00 00:00:00' AND oxshopid = '$shopId'";
        $result = $database->selectLimit($alarmsQuery, $limit, $start);
        while ($result != false && !$result->EOF) {
            $article = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
            $article->load($result->fields['oxartid']);
            if ($article->getPrice()->getBruttoPrice() <= $result->fields['oxprice']) {
                $this->sendeMail(
                    $result->fields['oxemail'],
                    $result->fields['oxartid'],
                    $result->fields['oxid'],
                    $result->fields['oxprice']
                );
            }
            $result->fetchRow();
        }
    }
protected function sendPriceChangeNotifications ( $ start , $ limit ) { $ config = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: FETCH_MODE_ASSOC ) ; $ shopId = $ config -> getShopId ( ) ; $ alarmsQuery = "SELECT oxid, oxemail, oxartid, oxprice FROM oxpricealarm
            WHERE oxsended = '000-00-00 00:00:00' AND oxshopid = '$shopId'" ; $ result = $ database -> selectLimit ( $ alarmsQuery , $ limit , $ start ) ; while ( $ result != false && ! $ result -> EOF ) { $ article = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; $ article -> load ( $ result -> fields [ 'oxartid' ] ) ; if ( $ article -> getPrice ( ) -> getBruttoPrice ( ) <= $ result -> fields [ 'oxprice' ] ) { $ this -> sendeMail ( $ result -> fields [ 'oxemail' ] , $ result -> fields [ 'oxartid' ] , $ result -> fields [ 'oxid' ] , $ result -> fields [ 'oxprice' ] ) ; } $ result -> fetchRow ( ) ; } }
Sends price alert notifications about changed article prices.

@param int $start How much price alerts was already sent.
@param int $limit How much price alerts to send.
Sends price alert notifications about changed article prices .