source/Application/Model/Basket.php
protected function _getItemBundles($oBasketItem, $aBundles = [])
    {
        if ($oBasketItem->isBundle()) {
            return [];
        }

        // does this object still exists ?
        if ($oArticle = $oBasketItem->getArticle()) {
            $aDiscounts = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\DiscountList::class)->getBasketItemBundleDiscounts($oArticle, $this, $this->getBasketUser());

            foreach ($aDiscounts as $oDiscount) {
                $iAmnt = $oDiscount->getBundleAmount($oBasketItem->getAmount());
                if ($iAmnt) {
                    //init array element
                    if (!isset($aBundles[$oDiscount->oxdiscount__oxitmartid->value])) {
                        $aBundles[$oDiscount->oxdiscount__oxitmartid->value] = 0;
                    }

                    if ($oDiscount->oxdiscount__oxitmmultiple->value) {
                        $aBundles[$oDiscount->oxdiscount__oxitmartid->value] += $iAmnt;
                    } else {
                        $aBundles[$oDiscount->oxdiscount__oxitmartid->value] = $iAmnt;
                    }
                }
            }
        }

        return $aBundles;
    }
protected function _getItemBundles($oBasketItem, $aBundles = [])
    {
        if ($oBasketItem->isBundle()) {
            return [];
        }

        // does this object still exists ?
        if ($oArticle = $oBasketItem->getArticle()) {
            $aDiscounts = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\DiscountList::class)->getBasketItemBundleDiscounts($oArticle, $this, $this->getBasketUser());

            foreach ($aDiscounts as $oDiscount) {
                $iAmnt = $oDiscount->getBundleAmount($oBasketItem->getAmount());
                if ($iAmnt) {
                    //init array element
                    if (!isset($aBundles[$oDiscount->oxdiscount__oxitmartid->value])) {
                        $aBundles[$oDiscount->oxdiscount__oxitmartid->value] = 0;
                    }

                    if ($oDiscount->oxdiscount__oxitmmultiple->value) {
                        $aBundles[$oDiscount->oxdiscount__oxitmartid->value] += $iAmnt;
                    } else {
                        $aBundles[$oDiscount->oxdiscount__oxitmartid->value] = $iAmnt;
                    }
                }
            }
        }

        return $aBundles;
    }
protected function _getItemBundles ( $ oBasketItem , $ aBundles = [ ] ) { if ( $ oBasketItem -> isBundle ( ) ) { return [ ] ; } // does this object still exists ? if ( $ oArticle = $ oBasketItem -> getArticle ( ) ) { $ aDiscounts = \ OxidEsales \ Eshop \ Core \ Registry :: get ( \ OxidEsales \ Eshop \ Application \ Model \ DiscountList :: class ) -> getBasketItemBundleDiscounts ( $ oArticle , $ this , $ this -> getBasketUser ( ) ) ; foreach ( $ aDiscounts as $ oDiscount ) { $ iAmnt = $ oDiscount -> getBundleAmount ( $ oBasketItem -> getAmount ( ) ) ; if ( $ iAmnt ) { //init array element if ( ! isset ( $ aBundles [ $ oDiscount -> oxdiscount__oxitmartid -> value ] ) ) { $ aBundles [ $ oDiscount -> oxdiscount__oxitmartid -> value ] = 0 ; } if ( $ oDiscount -> oxdiscount__oxitmmultiple -> value ) { $ aBundles [ $ oDiscount -> oxdiscount__oxitmartid -> value ] += $ iAmnt ; } else { $ aBundles [ $ oDiscount -> oxdiscount__oxitmartid -> value ] = $ iAmnt ; } } } } return $ aBundles ; }
Returns array of bundled discount articles

@param object $oBasketItem basket item object
@param array  $aBundles    array of found bundles

@return array
Returns array of bundled discount articles