I have been struggling immensely to change the label of "Subtotal" in the email sent to users after they make a purchase.

I was able to remove everything BUT the sub total column, and I want to replace sub total with "Grand Total". I tried modifying the Mage_Sales.csv in app/locale/en_US, to no avail.

Does anyone have an idea on how or where I can change this?

I have a hunch it is in an .xml file, but I honestly don't know.

This image shows what I want changed as well. Thanks!



You can try overriding below file to your theme and modify subtotal text.

| improve this answer | |
  • This is not the subtotal text I want changed, so this, unfortunately, does not help me at all. – Jacob Raccuia Sep 3 '13 at 18:12

There are several places where the "subtotal" translation can be found. I did a quick grep over the files in the app/locale/en_US to find them.

find . -iname '*.csv' -exec grep -Hin '"subtotal"' {} \; | awk -F: '{print $1":"$2}'

Running the command returned the following results:


My best guess it's either in Mage_Sales.csv or Mage_Checkout.csv. You can overwrite them in those files but as @Tim pointed out, with the next update you would overwrite them.

So it's better to do the translation in your template directory. When using the Default template and package that would be the file app/design/frontend/default/default/locale/en_US/translate.csv.

Also I've noticed in your screendump, +1 for attaching that, that it says 'points' instead of a regular currency. My guess is that this is a 3th party extension with it's own translation file. You can use the SSH command I specified before to see if the subtotal label is also specified in there. Also make sure this 3th party extension (if it is) actually offers a translatable label or maybe it's hardcoded in that extension.

If it's the case that it is hardcoded please run the subtotal label through the sales helper translation function

| improve this answer | |
  • I actually added the currency myself, but there is a plugin that adds the ability to use "points" or internal credit. I will definitely try running grep to see. Especially if the points has it's own file. Will check soon! – Jacob Raccuia Aug 31 '13 at 17:21
  • I changed every instance of "subtotal" after running my grep, and none of them changed the display text in the email. It makes me believe that someone ( in one of the extensions I downloaded ), hard coded it in. I'm going to attempt to continue to grep till I find it. – Jacob Raccuia Sep 3 '13 at 19:16

There is "Subtotal" and "Subtotal:" in en_US/Mage_Sales.csv. Are you sure you modified the one w/o colon? Also the Magento cache had to be flushed afterwards.

P.S. This is not the prettiest way to modify the translation instance as it will be overwritten with the next Magento version which is suppose to come in the end of September.

| improve this answer | |
  • Yes, I modified both and flushed cache. I am not concerned with the upgrade, fortunately. – Jacob Raccuia Aug 31 '13 at 17:20

I found the answer, thanks to Sander's example of Grep. I grepped for "('Subtotal')" and in /app/code/core/Mage/Sales/Block/Order/Totals.php I modified this section, around line 90.

     * Initialize order totals array
     * @return Mage_Sales_Block_Order_Totals
    protected function _initTotals()
        $source = $this->getSource();

        $this->_totals = array();
        $this->_totals['subtotal'] = new Varien_Object(array(
            'code'  => 'subtotal',
            'value' => $source->getSubtotal(),
            'label' => $this->__('Subtotal')

I must have messed up somewhere, because I am sure one of the .csv's Sander had listed in the locale must have related to this piece. Since my shop does not need to upgrade and does not need other languages, I went ahead and wrote "Grand Total" in directly. For others who may see this, I recommend, as everyone else has, to modify a locale instead.

Thanks Sander and everyone else who has helped!

| 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.