Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing order of shopping cart totals in Magento

I am having a requirement that I have to change the order of totals in a shopping cart in Magento. My requirement is shipping charge should display before Tax. Currently it is displaying as Subtotal-Tax-shipping charge-Grand Total and I need as Subtotal-shipping charge-Tax-Grand total. Can anyone help me from where I can edit this.

like image 265
Nafee Avatar asked Jan 29 '13 06:01

Nafee


People also ask

How do I get the total cart in Magento 2?

Get the number of items in cart and total quantity in cart. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $cart = $objectManager->get('\Magento\Checkout\Model\Cart'); $totalItems = $cart->getQuote()->getItemsCount(); $totalQuantity = $cart->getQuote()->getItemsQty();

How do I empty the cart in Magento 2?

There's no “EMPTY CART” on Magento's cart page It really isn't that hard. All you have to do is create yourselves a small extension that consists of Block, Controller, XML, Model and Template with very little logic inside.


1 Answers

You can configure it in the Magento backend itself. Go to System->Configuration->Sales->Checkout Total Sort Order.Set the sorting order as you wish.

like image 168
Rohit S Avatar answered Sep 20 '22 15:09

Rohit S