I am trying to download a render version of the sidebar of the cart that I intend to download via ajax ... I searched a lot, and it seems the best approach is to create a custom module that will handle all my ajax request. I created a custom module and everything seems to work, however, when I show sidebar.phtml, it does not display correctly. It appears as if there is nothing in the cart. (they are supposed to be just trying to read the file without using session information). I was looking for a bunch, but nothing looks like what I'm trying to do.
This is the im code used in my user controller to load the phtml file, which is essentially a copy and past of the checkout / cart / sidebar.phtml file.
$layout = $this->loadLayout(); $block = $this->getLayout()->createBlock( 'Mage_Core_Block_Template', 'PPWD_Custom', array('template' => 'custom/custom.phtml') ); echo $block->toHtml();
thanks
source share