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 Apr 12 '16 at 7:38

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 :) – Matej Đaković Apr 13 '16 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, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.