I am wanting to understand some things of how Magento "thinks" (i.e. how the designers designed it). One area is related to tax calculations, and when they occur.
Using the OnePage Checkout, I see that the quote is already present (in the database) when you click "Place Order", but it's set into the ::getQuote() object.
I also note that inside function saveOrderAction()
, the following line is called if there is payment data:
....
$this->getOnepage()->getQuote()->getPayment()->importData($data);
....
which in turn calls collectTotals()
I notice there is no tax set at this point for the quote - and in fact there are no tax fields in sales_flat_quote
like there are in sales_flat_order
.
My question: Is the philosophy here basically, "We don't calculate the tax on the quote level because the address may change"? Or is there another reason? Tax fields are basically only in the _order and _invoice sections of sales_flat_..
(Clarification: _tax fields are in the sales_flat_quote_item
table, but not in the sales_flat_quote
table)