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

        $activeAlarmsQuery =
            "SELECT oxprice, oxartid FROM oxpricealarm
                    WHERE oxsended = '000-00-00 00:00:00' AND oxshopid = '$shopId'";
        $result = $database->select($activeAlarmsQuery);
        $count = 0;
        while ($result != false && !$result->EOF) {
            $alarmPrice = $result->fields['oxprice'];
            $article = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
            $article->load($result->fields['oxartid']);
            if ($article->getPrice()->getBruttoPrice() <= $alarmPrice) {
                $count++;
            }
            $result->fetchRow();
        }

        return $count;
    }
protected function countActivePriceAlerts()
    {
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $shopId = $config->getShopId();

        $activeAlarmsQuery =
            "SELECT oxprice, oxartid FROM oxpricealarm
                    WHERE oxsended = '000-00-00 00:00:00' AND oxshopid = '$shopId'";
        $result = $database->select($activeAlarmsQuery);
        $count = 0;
        while ($result != false && !$result->EOF) {
            $alarmPrice = $result->fields['oxprice'];
            $article = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
            $article->load($result->fields['oxartid']);
            if ($article->getPrice()->getBruttoPrice() <= $alarmPrice) {
                $count++;
            }
            $result->fetchRow();
        }

        return $count;
    }
protected function countActivePriceAlerts ( ) { $ database = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: FETCH_MODE_ASSOC ) ; $ config = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ shopId = $ config -> getShopId ( ) ; $ activeAlarmsQuery = "SELECT oxprice, oxartid FROM oxpricealarm
                    WHERE oxsended = '000-00-00 00:00:00' AND oxshopid = '$shopId'" ; $ result = $ database -> select ( $ activeAlarmsQuery ) ; $ count = 0 ; while ( $ result != false && ! $ result -> EOF ) { $ alarmPrice = $ result -> fields [ 'oxprice' ] ; $ article = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Article :: class ) ; $ article -> load ( $ result -> fields [ 'oxartid' ] ) ; if ( $ article -> getPrice ( ) -> getBruttoPrice ( ) <= $ alarmPrice ) { $ count ++ ; } $ result -> fetchRow ( ) ; } return $ count ; }
Counts active price alerts and returns this number.

@return int
Counts active price alerts and returns this number .