I use the function "add to wishlist" in my magento ecommerce web store! if user is not registered and logged in, he is not able to add the product to his wishlist. What I would like to accomplish is to show the message to user that he needs to be registered and logged in, in able to add the product to wishlist. This message should be displayed to user only when he press the button add to wishlist when he is not logged in.


*UPDATED: 24.10.2015 *

so far, i'm using in my view page:

                Mage::getSingleton('core/session')->addError('You need to be looged in!');

with the above code i get the wanted message, but i'm not able to close the message. Anybody?

  • anybody having an idea? – user15151 Oct 24 '15 at 15:10
  • What do you mean by close? Magento shows a message, if you visit the next page it is gone. If you add it again it is shown again. If you need more help, please specify what you want to achieve, steps the customer does and what you expect to happen. – Fabian Blechschmidt Jun 4 '16 at 10:48