How do I retrieve a success message in Magento?

Posted by Raul on Stack Overflow See other posts from Stack Overflow or by Raul
Published on 2010-06-16T07:10:11Z Indexed on 2010/06/18 6:43 UTC
Read the original article Hit count: 284

Filed under:

How do I retrieve a success message in Magento?

Array
(
    [core] => Array
        (
            [_session_validator_data] => Array
                (
                    [remote_addr] => 192.168.151.102
                    [http_via] => 
                    [http_x_forwarded_for] => 
                    [http_user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4
                )

            [session_hosts] => Array
                (
                    [technova2] => 1
                )

            [messages] => Mage_Core_Model_Message_Collection Object
                (
                    [_messages:protected] => Array
                        (
                        )

                    [_lastAddedMessage:protected] => Mage_Core_Model_Message_Success Object
                        (
                            [_type:protected] => success
                            [_code:protected] => Your review has been accepted for moderation
                            [_class:protected] => 
                            [_method:protected] => 
                            [_identifier:protected] => 
                            [_isSticky:protected] => 
                        )

                )

            [just_voted_poll] => 
            [visitor_data] => Array
                (
                    [] => 
                    [server_addr] => -1062692990
                    [remote_addr] => -1062693018
                    [http_secure] => 
                    [http_host] => technova2
                    [http_user_agent] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4
                    [http_accept_language] => en-US,en;q=0.8
                    [http_accept_charset] => ISO-8859-1,utf-8;q=0.7,*;q=0.3
                    [request_uri] => /~rahuls/sextoys/index.php/review/product/list/id/169/
                    [session_id] => 21bq2vtkup5m1gtghknlu1tit42c6dup
                    [http_referer] => http://technova2/~rahuls/sextoys/index.php/review/product/list/id/169/
                    [first_visit_at] => 2010-06-16 05:49:56
                    [is_new_visitor] => 
                    [last_visit_at] => 2010-06-16 06:00:00
                    [visitor_id] => 935
                    [last_url_id] => 23558
                )

            [last_url] => http://technova2/~rahuls/sextoys/index.php/review/product/list/id/169/
        )     
)

After posting the review I want to display the message: "Your review has been accepted for moderation". It appears in the $_SESSION array, but how do I fetch it? Please help. Thanks in advance.

© Stack Overflow or respective owner

Related posts about magento