Google+

Pages

Saturday, May 5, 2012

Magento: Hide Tax from Grand Total in Customer Shopping Cart

If you want to hide tax from checkout/cart page, try the following:

Go to:

\app\design\frontend\[base]\[default]\template\checkout\cart\totals.phtml

Find the line (about 41):
<?php echo $this->renderTotals(); ?>
and replace with this:
<?php
      $rendertot = $this->renderTotals();
      $rendertot_tr = explode('</tr>', $rendertot);
          
      foreach($rendertot_tr as $trkey => $trval) {
         if( strpos($trval, __('Tax')) ) {
             unset($rendertot_tr[$trkey]);
         }
      }
      $rendertot_tr = implode('</tr>', $rendertot_tr);
      echo $rendertot_tr;
?>
It will remove tax row from cart page.
Note: Replace [base] with your current Package name and [default] with your theme name.

3 comments:

Unknown said...

This hides tax and Grand Total. How can I remove tax but keep Grand total?

And still not have grand total factor in tax into the price.

Jak said...

Works for me. Cheers!

Bob said...

hide tax works fine, thanks! And how can i hide subtotal and shipping row this way?