source/Application/Model/Discount.php
protected function _isArticleAssigned($oArticle)
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sDiscountIdQuoted = $oDb->quote($this->oxdiscount__oxid->value);

        $sQ = "select 1
                from oxobject2discount
                where oxdiscountid = {$sDiscountIdQuoted} and oxtype = 'oxarticles' ";
        $sQ .= $this->_getProductCheckQuery($oArticle);

        return $oDb->getOne($sQ) ? true : false;
    }
protected function _isArticleAssigned($oArticle)
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sDiscountIdQuoted = $oDb->quote($this->oxdiscount__oxid->value);

        $sQ = "select 1
                from oxobject2discount
                where oxdiscountid = {$sDiscountIdQuoted} and oxtype = 'oxarticles' ";
        $sQ .= $this->_getProductCheckQuery($oArticle);

        return $oDb->getOne($sQ) ? true : false;
    }
protected function _isArticleAssigned ( $ oArticle ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sDiscountIdQuoted = $ oDb -> quote ( $ this -> oxdiscount__oxid -> value ) ; $ sQ = "select 1
                from oxobject2discount
                where oxdiscountid = {$sDiscountIdQuoted} and oxtype = 'oxarticles' " ; $ sQ .= $ this -> _getProductCheckQuery ( $ oArticle ) ; return $ oDb -> getOne ( $ sQ ) ? true : false ; }
Checks whether this article is assigned to discount

@param \OxidEsales\Eshop\Application\Model\Article $oArticle

@return bool
Checks whether this article is assigned to discount