Magento move cart to header

# xml config
<?xml version="1.0" encoding="UTF-8"?>
        <remove name="checkout_cart_link"/>     <!-- remove My Cart and Checkout from haeder -->
        <remove name="cart_sidebar"/>
        <reference name="header">
            <block type="checkout/cart_sidebar" name="cart_topbar" as="topCart" template="checkout/cart/topbar.phtml"/>
# header
<?php echo $this->getChildHtml('topCart')?>
# style
.header .block-cart {
.block-cart .block-content {
    border: none;
    -moz-box-shadow: 0px 0px 0px #0C0C0C;
    background: #E4DFD4;
    height: 47px;
.block-cart .amount {
    padding-top: 4px;
    text-align: center;
.block-cart .summary {
    background:none repeat scroll 0 0 #E4DFD4;
    padding: 2px 8px 4px;
.block-cart .subtotal {
    background:none repeat scroll 0 0 #470615;
# translation
sed -i 's|,"Zum Warenkorb"|,"Warenkorb anzeigen"|g' ./app/locale/de_DE/Mage_Customer.csv
sed -i 's|,"Vers le panier"|,"Consulter panier"|g' ./app/locale/fr_FR/Mage_Customer.csv
sed -i 's|,"Régler mes achats"|,"Caisse"|g' ./app/locale/fr_FR/Mage_Checkout.csv
# ./app/design/frontend/default/default/template/checkout/cart/topbar.phtml
 * ./app/design/frontend/default/default/template/checkout/cart/topbar.phtml
 * based on ./app/design/frontend/base/default/template/checkout/cart/sidebar.phtml
<div class="block block-cart">
    <?php $_cartQty = $this->getSummaryCount() ?>
    <div class="block-title">
        <strong><span><?php echo $this->__('My Cart') ?></span></strong>
    <div class="block-content">
    <?php if ($_cartQty > 0): ?>
        <div class="summary">
            <p class="subtotal">
                <a href="<?php echo $this->getUrl('checkout/cart'); ?>">
                <?php echo $_cartQty . ' '; ?>
                <?php if ($_cartQty == 1): ?>
                    <?php echo $this->__('Item') ?>
                <?php else: ?>
                    <?php echo $this->__('Items') ?>
                <?php endif ?>
                <?php echo $this->__('Total') ?>: <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
            <p class="amount">
                <a href="<?php echo $this->getUrl('checkout/cart'); ?>"><?php echo $this->__('To Cart') ?></a> | 
                <a href="<?php echo $this->getUrl('checkout'); ?>"><?php echo $this->__('Checkout') ?></a>
    <?php else: ?>
        <p class="empty"><?php echo $this->__('You have no items in your shopping cart.') ?></p>
    <?php endif ?>
execute this:
mkdir -p ./app/design/frontend/default/default/template/checkout/cart
wget -O ./app/design/frontend/default/default/template/checkout/cart/topbar.phtml
# OPTIONAL: HowTo edit Wishlist
mkdir -p  code/local/Mage/Wishlist/Block
cp ./app/code/core/Mage/Wishlist/Block/Links.php ./app/code/local/Mage/Wishlist/Block/Links.php
# Links


Thank you very much!! This is

Thank you very much!! This is the best way to do it I´ve found, works perfect, I´d like to support your site but there´s no ad to click on. Cheers!

And in top.links?

Thanks for the tutorial! I works for me although i'm a newbie.

I'll prefer to place the Cart in the top.links block, but it doesn't show although I modify the top.links.phtml file like header.phtml. Can You help?

This is the XML in the local.xml ...

By the way you have a typo in the title haeder -> header.