In following path, app\design\frontend\MYTHEME\default\template\checkout\cart\totals.phtml file contains $this->renderTotals().

My question is that, which phtml file is called by renderTotals() method ?

I want to update Subtotal, Shipping & Handling (Flat Rate - Fixed), Grand Total style in http://localhost/MYTHEME/index.php/checkout/cart/


The easier way to find out what template is used is to enable the template path hints.
But here is the stacktrace you need to follow.

Mage_Checkout_Block_Cart_Totals::renderTotals calls renderTotal for each total.
This one calls _getTotalRenderer that works like this:

if there is a block with the name $code_total_renderer in the page ($code is the code of the total) then that block is used.
Most probably these blocks do not exist, but it's a good extension point because you can add any block you want.
If the block does not exist, it looks in the config for the node global/sales/quote/totals/{$code}/renderer and uses this one. The template should be defined in the block used.

you will find in config.xml of the Tax module (I have no idea why it's not in the sales module) this


This means that for example for subtotal the block tax/checkout_subtotal is used. If you look inside the block you will see the template tax/checkout/subtotal.phtml.
You can take the same steps for all the other totals you need, but first give the template path hints a try. It may save you the trouble of digging through the xmls.

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.