I need to add a cart to the header. I am creating my own custom theme which feeds of the RWD theme. I need a cart that shows total items and value.

  • Please put what where you have tried
    – Amit Bera
    Commented Apr 12, 2016 at 7:38

2 Answers 2


I think it will be much faster and secure to use ready made solution like this one.

  • why use extension? RWD theme have minicart as default :) Commented Apr 13, 2016 at 9:57

I added the following code to the custom-theme/default/layout/local.xml file.

<reference name="header">
<block type="checkout/cart_sidebar" name="cart_sidebar" as="top-cart" template="checkout/cart/sidebar.phtml"/>

I then added the following code to the custom-theme/default/page/html/header.phtml where I wanted the cart to show.

<?php echo $this->getChildHtml('top-cart'); ?>

I then customised the style and layout of the following page.


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.