Hello! Currently Running Magento 1.8.1

Looking to add a ShoppingCart Icon which links to Shopping Cart / Checkout at right side of header.

Would like to know

  1. Steps to Upload and Show ShoppingCart [RIGHT HEADER]
  2. Steps to Resize ShoppingCart
  3. Steps to Add/Remove Links in Quick Access Container (My account, Checkout, etc.)

2 Answers 2


Please see post:

Move Cart to Header In Magento 1.8.1

" (1) In yourTheme/template/page/html/header.phtml:

//Place following code where you want Cart to show:
<?php echo $this->getChildHtml('cart_sidebar'); ?>

" "Please copy and paste base/default/layout/checkout.xml into YOURTHEME/layout. Then rename

<reference name="right"> 
<reference name="header">"

"Normaly the cart is not in right column anymore. Also the cart should appear in the header if you still have getChildHtml('cart_sidebar'); ?> in header.phtml"


You can easily add cart summary to the header using local.xml file. I thought finding good documentation on how to add a cart summary to the header of a site would be simple. Unfortunately not! When building a Magento theme, I use the local.xml methodology, and fall back on the base files. It’s widely considered the ‘right’ way to theme for Magento and in the interests of being jolly good people, that’s the way we’ll be doing things here. If you aren’t familiar with the use of a local.xml to make your theme amendments, read about the Magento and come back when you are done. First, in your local.xml file, add the following within the tag section: If you want to remove the ‘cart’ and ‘checkout’ links from the header you also need to add this line:

Then finally here we want to add our new section, so stick this in:

Save the local.xml file. Now open your header.phtml template file located here: /app/design/frontend/[your package]/[your package]/template/page/html/header.phtml And add this where you want to header cart to sit:

<?php echo $this->getChildHtml('topCart')?>

Save the header.phtml file. Now make your top-cart.phtml file and save it here: /app/design/frontend/[your package]/[your package]/template/checkout/cart/top_cart.phtml Mine was a fairly cut-down one, here is the contents of mine:

<?php $_cartQty = $this->getSummaryCount(); if ($_cartQty>0) { if ($_cartQty==1) { echo $this->__('There is 1 item in your cart.', $this->getUrl('checkout/cart')); } else { echo $this->__('There are %s items in your cart.', $this->getUrl('checkout/cart'), $_cartQty); } } else { echo $this->__('You have no items in your cart.'); } ?> < ?php echo $this->__(' Subtotal:') ?> < ?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?> < ?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?> (< ?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> < ?php echo Mage::helper('tax')->getIncExcText(true) ?>) < ?php endif; ?>

Save the top_cart.phtml file Upload the files and your done. It’s then just a matter of styling the elements with CSS to your liking.

  • Hi, please help. For the top-cart.phtml file, I did not find the directory you wrote. Using 1.8.1 Magento - I have added to the header.phtml. The line following Remove the cart and checkout links is blank, what should I do to remove cart and checkout links?
    – JasonC91
    Oct 16, 2014 at 16:39

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.