Right when we click the cart icon we are taken to cart page where all product or products added to cart are shown.

On this page I want to add some custom text and icons below the cart summary by removing Estimated Shipping Tax and placing my text instead of Estimated Shipping Tax.

Please just tell where I can add these changes ?


In Magento CE the Estimated Shipping Tax is loaded in the following template file.

[your magento install dir]/app/design/frontend/YOURPACKAGE/YOURTHEME/template/checkout/cart.phtml

If your theme does not contain this file then you can copy it from the /base/default/ theme and add it to your own theme.

Open this file and look for the following line of code

<?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?>

replace this line with the following lines of code

<!-- <?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?> -->
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_identifier')->toHtml(); ?>

The first line comments the Estimated Shipping Tax preventing it from rendering. So it will no longer be displayed. The second line will insert a CMS Static block to the cart page with identifier block_identifier, but only if this static block is active.

In your Magento Admin Panel go to CMS > Static Block and click on the Add New Block button.

  1. Fill in your new block title
  2. Fill in your new block identifier (this is important and should match the identifier that you have used in the cart.phtml file)
  3. Choose the proper store view(s)
  4. Enable the block
  5. Add the code for the custom text and icons that you want to display
  6. Save the block

Now refresh all cache and go to your cart page. The Estimated Shipping Tax block should be replaced by your new text and icons.

| improve this answer | |
  • That's great.You Rock. :) – Fufu Tulla Aug 22 '15 at 9:48

Magento has something called template path hints. Template path hints are little tags which would lie on top of your shop frontend. These little tags enable you to view where exactly the code of a specific element is stored within your file structure.

To activate template path hints:

  1. Log into the magento back-end admin
  2. Go to System -> Configuration in the main menu
  3. Go to Developer on the bottom left under ADVANCED
  4. Switch to the store view on the top left to your current website or store view.
  5. Under the Debug tab of the same Developer config page you will see a new option appear that will allow you to turn on/off template path hints.


| improve this answer | |
  • I find it bit sarcastic :) but let me check – Fufu Tulla Aug 21 '15 at 10:55

To remove Estimated Shipping
In File

app/design/frontend/[YOUR THEME]/[YOUR PACKAGE]/template/checkout/cart.phtml

Comment out below code

<?php //if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping');

or In file

app/design/frontend/[YOUR THEME]/[YOUR PACKAGE]/layout/local.xml

add below code

        <reference name="content">
            <remove name="checkout.cart.shipping" />

To Add custom cms static block at the same location as of shipping block

Create a CMS Static block and add below code in file app/design/frontend/[YOUR THEME]/[YOUR PACKAGE]/template/checkout/cart.phtml just before closing div class="cart-forms"

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('your_static_block_id')->toHtml(); ?>
| improve this answer | |

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.