source/Application/Model/Basket.php
protected function _mergeDiscounts($aDiscounts, $aItemDiscounts)
    {
        foreach ($aItemDiscounts as $sKey => $oDiscount) {
            // add prices of the same discounts
            if (array_key_exists($sKey, $aDiscounts)) {
                $aDiscounts[$sKey]->dDiscount += $oDiscount->dDiscount;
            } else {
                $aDiscounts[$sKey] = $oDiscount;
            }
        }

        return $aDiscounts;
    }
protected function _mergeDiscounts($aDiscounts, $aItemDiscounts)
    {
        foreach ($aItemDiscounts as $sKey => $oDiscount) {
            // add prices of the same discounts
            if (array_key_exists($sKey, $aDiscounts)) {
                $aDiscounts[$sKey]->dDiscount += $oDiscount->dDiscount;
            } else {
                $aDiscounts[$sKey] = $oDiscount;
            }
        }

        return $aDiscounts;
    }
protected function _mergeDiscounts ( $ aDiscounts , $ aItemDiscounts ) { foreach ( $ aItemDiscounts as $ sKey => $ oDiscount ) { // add prices of the same discounts if ( array_key_exists ( $ sKey , $ aDiscounts ) ) { $ aDiscounts [ $ sKey ] -> dDiscount += $ oDiscount -> dDiscount ; } else { $ aDiscounts [ $ sKey ] = $ oDiscount ; } } return $ aDiscounts ; }
Merges two discount arrays. If there are two the same
discounts, discount values will be added.

@param array $aDiscounts     Discount array
@param array $aItemDiscounts Discount array

@return array $aDiscounts
Merges two discount arrays . If there are two the same discounts discount values will be added .