Magento – How to put Shopping cart on the right sidebar in checkout

cartcheckoutmagento-1.9onepage-checkoutshopping-cart

I want to put the shopping cart at the right side of of my horizontal checkout.
Something like this enter image description here

Best Answer

When I wanted to show the cart on the sidebar, my first instinct was to use the existing checkout/cart_sidebar block in Magento, but I have found a better solution which uses the checkout/onepage_review_info block instead.

Here's what it looks like: enter image description here

Just add this to your local.xml:

<checkout_onepage_index>
    <!-- This sets the template to 2column-right.phtml. -->
    <update handle="page_two_columns_right"/>

    <reference name="right">


        <block type="checkout/onepage_review_info" name="checkout_review_sidebar" output="toHtml" before="-" template="checkout/onepage/review/info.phtml">
            <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
            <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action>
            <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/onepage/review/item.phtml</template></action>
            <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/>
            <block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before" translate="label">
                <label>Items Before</label>
            </block>
            <block type="core/text_list" name="checkout.onepage.review.info.items.after" as="items_after" translate="label">
                <label>Items After</label>
            </block>
            <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
        <!-- This block is only for information; we don't want the "Place Order" button showing.
            <block type="core/template" name="checkout.onepage.review.button" as="button" template="checkout/onepage/review/button.phtml"/>
        -->
        </block>
    </reference>
</checkout_onepage_index>
Related Topic