How are the quote totals declared?

totals
quote
quote-totals
(Dmitry Fedyuk) #1

Details:


app/code/Magento/Tax/etc/sales.xml#L9-L34

<section name="quote">
	<group name="totals">
		<item name="tax_subtotal" instance="Magento\Tax\Model\Sales\Total\Quote\Subtotal" sort_order="200"/>
		<item name="tax_shipping" instance="Magento\Tax\Model\Sales\Total\Quote\Shipping" sort_order="300"/>
		<item name="tax" instance="Magento\Tax\Model\Sales\Total\Quote\Tax" sort_order="450">
			<renderer name="adminhtml" instance="Magento\Sales\Block\Adminhtml\Order\Create\Totals\Tax"/>
			<renderer name="frontend" instance="Magento\Tax\Block\Checkout\Tax"/>
		</item>
		<item name="subtotal">
			<renderer name="adminhtml" instance="Magento\Sales\Block\Adminhtml\Order\Create\Totals\Subtotal"/>
			<renderer name="frontend" instance="Magento\Tax\Block\Checkout\Subtotal"/>
		</item>
		<item name="shipping">
			<renderer name="adminhtml" instance="Magento\Sales\Block\Adminhtml\Order\Create\Totals\Shipping"/>
			<renderer name="frontend" instance="Magento\Tax\Block\Checkout\Shipping"/>
		</item>
		<item name="discount">
			<renderer name="adminhtml" instance="Magento\Sales\Block\Adminhtml\Order\Create\Totals\Discount"/>
			<renderer name="frontend" instance="Magento\Tax\Block\Checkout\Discount"/>
		</item>
		<item name="grand_total">
			<renderer name="adminhtml" instance="Magento\Sales\Block\Adminhtml\Order\Create\Totals\Grandtotal"/>
			<renderer name="frontend" instance="Magento\Tax\Block\Checkout\Grandtotal"/>
		</item>
	</group>
</section>

0 Likes

How does \Magento\Quote\Model\Quote\Address\Total\Subtotal::collect() work?
How are the invoice totals declared?
How does \Magento\Quote\Model\Quote\TotalsCollector::collectAddressTotals() work?
How are the credit memo totals declared?
(Dmitry Fedyuk) #2

See also:

0 Likes