/** * Calculate shipping price without store tax * * @param Mage_Sales_Model_Quote_Address $address * @return Mage_Tax_Model_Sales_Total_Quote_Subtotal */ protected function _processShippingAmount($address) { if ($this->_areTaxRequestsSimilar) { return $this; } $store = $address->getQuote()->getStore(); $shippingTaxClass = $this->_config->getShippingTaxClass($store); $shippingAmount = $address->getShippingAmount(); $baseShippingAmount = $address->getBaseShippingAmount(); if ($shippingTaxClass) { $request = $this->_getStoreTaxRequest($address); $request->setProductClassId($shippingTaxClass); $rate = $this->_calculator->getRate($request); if ($rate) { $shippingTax = $this->_calculator->calcTaxAmount($shippingAmount, $rate, true, false); $shippingBaseTax = $this->_calculator->calcTaxAmount($baseShippingAmount, $rate, true, false); $shippingAmount -= $shippingTax; $baseShippingAmount -= $shippingBaseTax; $address->setTotalAmount('shipping', $this->_calculator->roundUp($shippingAmount)); $address->setBaseTotalAmount('shipping', $this->_calculator->roundUp($baseShippingAmount)); } } return $this; }