I need to add a custom row below grand total row. I have tried code from


It adds custom row but above grand total. I have tried to add a large value to tag totals_sort in config.xml but it is not working.

Also when I pass value for custom row it is formatted to amount with store currency. Like if I pass value as 100 then in totals section it will be shown as $100. But I need to show it as 100 ABC


Please see screen shot below.

enter image description here

  • 1
    did you found a solution?
    – M.Elwan
    Commented May 4, 2017 at 7:15

1 Answer 1


It is not obvious but totals have 2 different areas: main (code null) and footer (code footer). Regardless how do you sort your custom total it will always be above grand total (which is in a footer area) if it is in a main area.

So the solution is quite straightforward - add your total to footer area too. In order to do so in an array that fetch method of your total class returns add 'area' => 'footer'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.