troubleshooting Question

Magento: move minicart to header

Avatar of Dean OBrien
Dean OBrienFlag for United Kingdom of Great Britain and Northern Ireland asked on
PHPE-CommerceContent Management
4 Comments1 Solution3238 ViewsLast Modified:

I am trying to move the minicart from the right side bar to the header. The steps i have taken so far are:

1). Add this to checkout.xml
        <reference name="header">
            <block type="checkout/cart_header" name="cart_header" template="checkout/cart/header.phtml">

2. Add this to header.phtml
<?php echo $this->getChildHtml('cart_header') ?>

3. Duplicated and renamed the file mytemplate/templates/checkout/cart/sidebar.phtml to be called header.phtml.

This doesnt appear to work (however if i use the default cart_sidebar throughout steps 1 and 2 it appears). Im unsure what i need to do to make this work. Should i be defining the block "cart_header" in page.xml?

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros