protected function _extractQuoteAmounts(Mage_Sales_Model_Quote $quote)
    {
        return array_map(
            function ($address) {
                return array(
                    'subtotal' => round($address->getSubtotal(), 4) ?: 0.0000,
                    'discount' => round($address->getDiscountAmount(), 4) ?: 0.0000,
                    'ship_amount' => round($address->getShippingAmount(), 4) ?: 0.0000,
                    'ship_discount' => round($address->getShippingDiscountAmount(), 4) ?: 0.0000,
                    'giftwrap_amount' => round($address->getGwPrice() + $address->getGwItemsPrice(), 4) ?: 0.0000,
                );
            },
            $quote->getAllShippingAddresses()
        );
    }
protected function _extractQuoteAmounts(Mage_Sales_Model_Quote $quote)
    {
        return array_map(
            function ($address) {
                return array(
                    'subtotal' => round($address->getSubtotal(), 4) ?: 0.0000,
                    'discount' => round($address->getDiscountAmount(), 4) ?: 0.0000,
                    'ship_amount' => round($address->getShippingAmount(), 4) ?: 0.0000,
                    'ship_discount' => round($address->getShippingDiscountAmount(), 4) ?: 0.0000,
                    'giftwrap_amount' => round($address->getGwPrice() + $address->getGwItemsPrice(), 4) ?: 0.0000,
                );
            },
            $quote->getAllShippingAddresses()
        );
    }
protected function _extractQuoteAmounts ( Mage_Sales_Model_Quote $ quote ) { return array_map ( function ( $ address ) { return array ( 'subtotal' => round ( $ address -> getSubtotal ( ) , 4 ) ? : 0.0000 , 'discount' => round ( $ address -> getDiscountAmount ( ) , 4 ) ? : 0.0000 , 'ship_amount' => round ( $ address -> getShippingAmount ( ) , 4 ) ? : 0.0000 , 'ship_discount' => round ( $ address -> getShippingDiscountAmount ( ) , 4 ) ? : 0.0000 , 'giftwrap_amount' => round ( $ address -> getGwPrice ( ) + $ address -> getGwItemsPrice ( ) , 4 ) ? : 0.0000 , ) ; } , $ quote -> getAllShippingAddresses ( ) ) ; }
Extract quote amounts from each address.
@param  Mage_Sales_Model_Quote $quote
@return array
Extract quote amounts from each address .