7

i want and need in cart display Grand Total price without include tax, but tax price should be display in different line. How i can do this? where i can modify file?

Thanks

5

This will get you your carts subtotal:

Mage::getModel('checkout/cart')->getQuote()->getSubtotal();

This will get your your carts grand total:

Mage::helper('checkout')->formatPrice(Mage::getModel('checkout/cart')->getQuote()->getGrandTotal());
  • ok, good, now how i can get price in cart next: 1. grand total without table rate price? 2. get table rate price? - displayShippingPriceIncludingTax in cart not working 3. get tax value price in cart – Sergey Oct 23 '14 at 23:05
  • Here's someothing you can do to find variables to call using Magentos getX function system: $subtotal = Mage::getModel('checkout/cart')->getQuote(); var_dump($subtotal); This will dump all the variables that you can interact with from $subtotal. – hownowbrowncow Oct 24 '14 at 12:11
  • how about tax and shipping? – Sergey Oct 27 '14 at 16:10
  • @Sergey you could just subtract the grandtotal from the subtotal to get taxed amount – hownowbrowncow Oct 28 '14 at 13:24
6

Have you tried this config setting in the admin panel?

System > Configuration > Tax > Shopping Cart Display Settings

System > Configuration > Tax > Shopping Cart Display Settings

  • You are welcome @PriyaPonnusamy! – MaierB Dec 14 '16 at 14:58
1

This is magento bug.

Add this line of code in app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php at 1532 line no.

if ($this->_config->displayCartTaxWithGrandTotal($store)) {
            $grandTotal = $address->getSubtotal() + $address->getShippingAmount() + $taxAmount - $address->getShippingTaxAmount();
            $address->setGrandTotal($grandTotal);
}
1

Ok, so I figured it out. Appertently it's a core bug in Magento 1.9.2.4.

Go to: app/code/core/Mage/Tax/etc/config.xml

Change line: 165

From:

<after>freeshipping</after>

To:

<after>subtotal,nominal,shipping,freeshipping</after>

Read about the fix here:

https://github.com/OpenMage/magento-lts/pull/84

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.