Question

In a theme based on rwd (magento ce 1.9.1), how can I add the shipping estimate from the cart page on the mini cart?

I already searched a lot and still couldn't find if that's possible or what's the best way to do that. Similar questions about shipping options seemed to me to be only about the cart, where the fields are already present.

I already tried updating mini cart with the local.xml, but I'm never quite sure how the blocks work, so I don't know if I did the right thing. Also, I don't know if that's supposed to work that way, as I only saw examples of adding custom stuff or removing block that already exist. Anyway, here's what I did:

<block type="checkout/cart_minicart" name="minicart.actions" as="minicart_actions" template="checkout/cart/minicart/itens.phtml" >
    <block type="cms/block" name="minicart.actions.shipping" as="shipping">
        <action method="setBlockId"><block_id>tab-product-shipping</block_id></action>
    </block>
</block>

This is based on some example I saw in a blog and it did not work.

What I want is that the client can estimate shipping directly on the mini cart, without the need to go to the cart page. I thought the best way is to provide a link that, when clicked, opens a popup with the shipping estimate fields that already exist on magento cart.

I was hoping to make this change without needing to change the core code, just using local.xml or editing items.phtml.

Any advice.

Was it helpful?

Solution

To get the estimated shipping block in minicart.phtml. Use following code in the local.xml

<default>
    <reference name="cart_sidebar.extra_actions">
        <block type="checkout/cart_shipping" name="mini.checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>
    </reference>
</default>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top