Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento - Modify labels for cart and checkout (order review) screens

In the Magento default theme's cart page we see the following totals box towards the right mid of the screen: alt text

I want to modify the labels of the 5 fields in the above box, and I have been able to change the Grand Totals, by overriding the following design file:

/html/app/design/frontend/default/mine/template/tax/checkout/grandtotal.phtml

So, now it looks like this:

alt text

My Problem is to:

Change the labels for other 3 fields in the box, and the label of a discount box that appears there if a discount applies. I have spent some time grepping through other design files, but couldn't find any. It might be some classes to override, but I haven't been able to locate them either.

I am using Magento 1.4.1.1

UPDATE 1: After turning on template path hints, following are template paths for Cart

Subtotal: app/design/frontend//tax/checkout/subtotal.phtml

Total: app/design/frontend//checkout/total/default.phtml

GrandTotal: app/design/frontend//tax/checkout/grandtotal.phtml

Tax: app/design/frontend//tax/checkout/tax.phtml

Checkout

Same as for cart and the following additional one for

Shipping: app/design/frontend//tax/checkout/shipping.phtml

But when one goes into these template files, no labels are found except in grandtotal.phtml.

I found the solution to the problem, which I have mentioned in my own answer.

This question originally asked for help on two separate problems. I posted the other one later as another question.

like image 699
Ozair Kafray Avatar asked Nov 22 '10 06:11

Ozair Kafray


1 Answers

Why don't you change the labels with inline translator or in locale files?

 grep 'Grand Total'  app/locale/ -rsn

app/locale/en_US/Mage_Tax.csv:55:"Grand Total (Excl. Tax)","Grand Total (Excl. Tax)" app/locale/en_US/Mage_Tax.csv:56:"Grand Total (Excl.Tax)","Grand Total (Excl.Tax)" app/locale/en_US/Mage_Tax.csv:57:"Grand Total (Incl. Tax)","Grand Total (Incl. Tax)" app/locale/en_US/Mage_Tax.csv:58:"Grand Total (Incl.Tax)","Grand Total (Incl.Tax)" app/locale/en_US/Mage_Tax.csv:59:"Grand Total Excl. Tax","Grand Total Excl. Tax" app/locale/en_US/Mage_Tax.csv:60:"Grand Total Incl. Tax","Grand Total Incl. Tax" app/locale/en_US/Mage_Tax.csv:66:"Include Tax In Grand Total","Include Tax In Grand Total" app/locale/en_US/Mage_Rss.csv:22:"Grand Total","Grand Total" app/locale/en_US/Mage_Adminhtml.csv:366:"Grand Total","Grand Total" app/locale/en_US/Mage_Customer.csv:146:"Grand Total","Grand Total" app/locale/en_US/Mage_Sales.csv:216:"Grand Total","Grand Total" app/locale/en_US/Mage_Sales.csv:217:"Grand Total to be Charged","Grand Total to be Charged" app/locale/en_US/Mage_Sales.csv:373:"Order Grand Total","Order Grand Total" app/locale/en_US/Mage_Checkout.csv:104:"Grand Total:","Grand Total:"

or get the templates where this string is used:

 grep "__('Grand Total" app/design/ -rsn
like image 56
Anton S Avatar answered Nov 15 '22 04:11

Anton S