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>

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.


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

    <reference name="cart_sidebar.extra_actions">
        <block type="checkout/cart_shipping" name="mini.checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>
  • Thanks, it worked perfectly! One more thing, how can I know the name of the block to be referenced? Like, you used "cart_sidebar.extra_actions"... is there some documentation about it? I never found that info on magento website. – Raphael S Neto Aug 8 '15 at 21:34
  • You need to refer the core layout file like checkout.XML etc – MeenakshiSundaram R Aug 9 '15 at 2:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.