source/Application/Model/Discount.php
public function isForBundleItem($oArticle)
    {
        if ($this->oxdiscount__oxaddsumtype->value != 'itm') {
            return false;
        }

        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sQ = "select 1 from oxobject2discount where oxdiscountid=" . $oDb->quote($this->getId());
        $sQ .= $this->_getProductCheckQuery($oArticle);
        if (!($blOk = (bool) $oDb->getOne($sQ))) {
            // additional checks for amounts and other dependencies
            $blOk = $this->_checkForArticleCategories($oArticle);
        }

        return $blOk;
    }
public function isForBundleItem($oArticle)
    {
        if ($this->oxdiscount__oxaddsumtype->value != 'itm') {
            return false;
        }

        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sQ = "select 1 from oxobject2discount where oxdiscountid=" . $oDb->quote($this->getId());
        $sQ .= $this->_getProductCheckQuery($oArticle);
        if (!($blOk = (bool) $oDb->getOne($sQ))) {
            // additional checks for amounts and other dependencies
            $blOk = $this->_checkForArticleCategories($oArticle);
        }

        return $blOk;
    }
public function isForBundleItem ( $ oArticle ) { if ( $ this -> oxdiscount__oxaddsumtype -> value != 'itm' ) { return false ; } $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sQ = "select 1 from oxobject2discount where oxdiscountid=" . $ oDb -> quote ( $ this -> getId ( ) ) ; $ sQ .= $ this -> _getProductCheckQuery ( $ oArticle ) ; if ( ! ( $ blOk = ( bool ) $ oDb -> getOne ( $ sQ ) ) ) { // additional checks for amounts and other dependencies $ blOk = $ this -> _checkForArticleCategories ( $ oArticle ) ; } return $ blOk ; }
Checks if discount type is bundle discount

@param object $oArticle article object

@return bool
Checks if discount type is bundle discount