I'm trying to get global messages in compare products page, but none of the messages get rendered, instead all of them appear in any subsequent page I'm going, after producing messages with for example removing product from comparsion. I understand that this is normal behaviour for Magento, because normally compare page has a popup template, but I setTemplate
to 1column.phtml
in my local.xml
. Now I need global messages to appear there too. I included:
<?php echo $this->getMessagesBlock()->getGroupedHtml(); ?>
to catalog/product/compare/list.phtml
, but messages only appear in any subsequent page and not in compare list page.
As I found out from here, you can add custom messages. So I did
$this->getMessagesBlock()->addError('Test Error!');
echo $this->getMessagesBlock()->getGroupedHtml();
Now this custom error gets rendered as it should, but none of the other messages show. How could I get all session messages to be shown in compare page?