Here are the steps to move cart sidebar from right column to left column using local.xml file in magento. We can use this step for totally removing the cart sidebar as well.
Place the local.xml file in your theme’s layout directory and paste the code as follows:
<?xml version="1.0" encoding="UTF-8"?> <layout> <default> <reference name="left"> <block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-"> </block> </reference> <reference name="right"> <action method="unsetChild"><name>cart_sidebar</name></action> </reference> </default> </layout>
Here we’re adding cart sidebar in left column using reference name=”left” and removing from right column using action method=”unsetChild” as shown above.
This method is very useful if you’re working in a highly customizable store. We can also remove the cart sidebar by using the following code in local.xml file instead of the above one.
<?xml version="1.0" encoding="UTF-8"?> <layout> <default> <remove name="cart_sidebar" /> </default> </layout>
We can achieve this using simple way by changing the reference name in checkout.xml from “right” to “left” which is in your theme’s layout folder.
<reference name=”right”> to <reference name=”left”>
The reason I’ve used local.xml file is because I need to keep track of all the customization in a single file instead of changing each XML file for each block.