source/Application/Model/Order.php
public function getOrderCnt($blToday = false)
    {
        $sSelect = 'select count(*) from oxorder where ';
        $sSelect .= 'oxshopid = "' . \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId() . '"  and oxorder.oxstorno != "1" ';

        if ($blToday) {
            $sSelect .= 'and oxorderdate like "' . date('Y-m-d') . '%" ';
        }

        // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
        return ( int ) \OxidEsales\Eshop\Core\DatabaseProvider::getMaster()->getOne($sSelect);
    }
public function getOrderCnt($blToday = false)
    {
        $sSelect = 'select count(*) from oxorder where ';
        $sSelect .= 'oxshopid = "' . \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId() . '"  and oxorder.oxstorno != "1" ';

        if ($blToday) {
            $sSelect .= 'and oxorderdate like "' . date('Y-m-d') . '%" ';
        }

        // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
        return ( int ) \OxidEsales\Eshop\Core\DatabaseProvider::getMaster()->getOne($sSelect);
    }
public function getOrderCnt ( $ blToday = false ) { $ sSelect = 'select count(*) from oxorder where ' ; $ sSelect .= 'oxshopid = "' . \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getShopId ( ) . '"  and oxorder.oxstorno != "1" ' ; if ( $ blToday ) { $ sSelect .= 'and oxorderdate like "' . date ( 'Y-m-d' ) . '%" ' ; } // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804). return ( int ) \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getMaster ( ) -> getOne ( $ sSelect ) ; }
Returns orders count

@param bool $blToday if true calculates only current day orders

@return int
Returns orders count