Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Display cart subtotal in div inside header
Jr. Member
Total Posts:  6
Joined:  2011-11-07


I know this has been discussed many times but I am having some issues with this. It was working at one point, then maybe I installed an extension and it stopped working, I really don’t know;

So I am using:

$tmp_curcart = Mage::getSingleton(’checkout/session’)->getQuote()->getSubtotal();

to get my subtotal. Now here are the issues I’m having.

It will display 0 until a second item has been added to the cart and once the second item has been added it will only display the price of that item. However, when I go to my cart it will update correctly....this is weird, also, if I remove all items from my cart, the subtotal will remain the value last of the last removed item(instead of 0) even though my cart is empty.

Any suggestions to get this thing current would be awesome, I’m getting grey hairs over it.

BTW Im running

Thanks in advance!

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top