I am using magento In my header.phtml when I call the cart sidebar like

<?php echo $this->getChildHtml('cart_sidebar'); ?>

the sidebar is not getting displayed when hovered over the cart icon. Also I enabled it in backend.

Below is my cart. Kindly help me to enable the sidebar.

enter image description here

2 Answers 2


I have one more alternative to perform this task. Please follow below steps:

  1. Go to you theme folder i.e


Find the code given below:

<block type="page/html_header" as="header">

And past the cart sidebar block shown below:

<block name="header" as="header">     
<block name="top.links" as="topLinks"/>     
<block name="store_language" as="store_language" template="page/switch/languages.phtml"/>     
<block name="top.menu" as="topMenu"/>     
<!--Add cart sidebar block -->     
<block name="cart_sidebar" as="headerCart" template="checkout/cart/sidebar.phtml"/>     

2. : And now, in template file header.phtml


call cart sidebar block as a child in header

<?php echo $this->getChildHtml('headerCart')?>

try with direct block calling method

          echo $this->getLayout()
          ->toHtml(); ?>

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.