Magento1.9 – Use Rwd Minicart Instead of Sidebar Cart

magento-1.9rwd

Magento 1.9.1.1 with rwd theme. I'm trying to place the existing header minicart block (not the sidebar.phtml) within a cms page . I've tried using following

{{block type="checkout/cart_sidebar" template="checkout/cart/minicart.phtml"}}
and I get the icon and count but not the block content.

Best Answer

There is no way to call child block through CMS content.

But we can achieve this by CMS page layout section To get the minicart.phtml file.

Add below code to CMS page > design > layout.

<reference name="content">
            <block type="checkout/cart_minicart" name="minicart_head_cms" template="checkout/cart/minicart.phtml" before="-">
                <block type="checkout/cart_sidebar" name="minicart_content_cms" template="checkout/cart/minicart/items.phtml">
                    <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/cart/minicart/default.phtml</template></action>
                    <action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/minicart/default.phtml</template></action>
                    <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/minicart/default.phtml</template></action>
                    <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/minicart/default.phtml</template></action>
                   <block type="core/text_list" name="cart_sidebar.cart_promotion_cms" as="cart_promotion" translate="label" module="checkout">
                        <label>Mini-cart promotion block</label>
                    </block>
                    <block type="core/text_list" name="cart_sidebar.extra_actions_cms" as="extra_actions" translate="label" module="checkout">
                        <label>Shopping Cart Sidebar Extra Actions</label>
                    </block>
                </block>
            </block>
        </reference>
Related Topic