I am trying to redirect Magento after the client clicks the "Add to Cart" button to the category page, which I did without problems (after a little search, of course), using a hidden field called "return_url". This part works fine, and the item is added to the cart, and the user is redirected back to the category page. Once here, no matter what I tried, I can not get the message block to display a success (or error) message. Here is my most recent code attempt (in view.phtml):
$messages=Mage::getSingleton("checkout/session")->getMessages();
echo $this->getLayout()->createBlock("core/messages")->setMessages($messages)->getGroupedHtml();
Thank!
source
share