Question

I'm looking to modify the cart totals section on the basket page and need some help. Here is what I'm trying to achievebasket example

I want to know 1) How to add a new row with a title "shipping will be calculated at checkout" and 2) How to change "Grand Total to "Estimated Total"

Thankyou.

Was it helpful?

Solution

Changing Grand Total to Estimated Total is easily accomplished by editing the app/locale/ language file. For US, you would edit app/locale/en_US/Mage_Sales.csv. On or near line 265 you'll see the following:

"Grand Total","Grand Total"

Change it to:

"Grand Total","Estimated Total"

The change is immediate.

There are several ways to add a small information line like the one you are describing. One involves creating an extension to add a new row in the Totals area but since you just need a single line of text that doesn't modify any values you could do the following instead:

Copy app/design/frontend/base/default/template/checkout/cart/totals.phtml to your theme. (i.e. app/design/frontend/YOUR_PACKAGE/YOUR_THEME/template/checkout/cart/totals.phtml)

Around line 45 you'll see this:

<?php echo $this->renderTotals(); ?>

Above this line you can place your message:

<div class="your-custom-style">shipping will be calculated at checkout</div>

The result will look like this:

enter image description here

I put the class "your-custom-style" as an example showing that you can style the text any way you want.

This is assuming you are using the rwd theme. The same should work with any custom theme. The important thing is that the file gets into the correct location.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top