Technology Powered Knowledge Base
Get Our Free Instant Messenger with Audio & Video Call!

Move Magento Mini Cart from Right Area to Any Other Location

VN:F [1.9.22_1171]
Rating: +14 (from 14 votes)
VN:F [1.9.22_1171]
Rating: 9.7/10 (16 votes cast)

We can follow this procedure to move right side mini cart to top area (or what ever else), as we have seen in other websites. After that we can customize the phtml file of the cart to change user experience.
Copy the the block for the cart side bar:

<block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml"/>

Open up app\design\frontend\default\default\layout\page.xml as we can assuming the default theme.
Find the code near line number 58:

<block type="page/html_header" name="header" as="header">

Within that block, we will see other sub-blocks.
Paste new block in there. Add the “as” attribute and set it to “topcart”, new code will be

<block type="page/html_header" name="header" as="header">
	<block type="page/template_links" name="top.links" as="topLinks"/>
	<block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
	<block type="core/text_list" name="" as="topMenu"/>

	<block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/sidebar.phtml"/>

Go into app\design\frontend\default\default\template\page\html\header.phtm and add the code:
Place this where ever you want the cart to show up.

<?php echo $this-&gt;getChildHtml('topcart'); ?>
Move Magento Mini Cart from Right Area to Any Other Location, 9.7 out of 10 based on 16 ratings

Sign Up     Sign In