/** * Returns array of palain of formatted VATs which were calculated for basket * * @param bool $blFormatCurrency enambles currency formating * * @return array */ public function getProductVats($blFormatCurrency = true) { if (!$this->_oNotDiscountedProductsPriceList) { return array(); } $aVats = $this->_oNotDiscountedProductsPriceList->getVatInfo(); $oUtils = oxUtils::getInstance(); foreach ($this->_aDiscountedVats as $sKey => $dVat) { if (!isset($aVats[$sKey])) { $aVats[$sKey] = 0; } // add prices of the same discounts $aVats[$sKey] += $oUtils->fRound($dVat, $this->_oCurrency); } if ($blFormatCurrency) { $oLang = oxLang::getInstance(); foreach ($aVats as $sKey => $dVat) { $aVats[$sKey] = $oLang->formatCurrency($dVat, $this->getBasketCurrency()); } } return $aVats; }