It seems that what you are requesting already exists in Magento. After the user has sent feedback about the product, the message "Your feedback was accepted for moderation" appears by default, as indicated in the application / code / kernel / Mage / Reviews / Controllers / ProductController.php on line 188 (Magento 1.4. 0.1)
In any case, if you want to display messages (notification, success, error, warning), just use, for example, in case of a successful message:
<?php $message = $this->__('Your success message here'); Mage::getSingleton('core/session')->addSuccess($message); ?>
The message will be stored in the session and automatically appear in the external interface if the page template file has the code this this this this this this this this this this this this this is this this this this this this this this this is the this this this this this this is this this this is this this is get this.border :() this-> getMessagesBlock () β getGroupedHtml (), which takes place in all standard phtml pages comes with Magento. Therefore, you really do not need to worry.
Of course, in the example above you can change
addSuccess($message)
by addError($message) or addWarning($message) or addNotice($message) depending on the type of information you want to display.
Herve guΓ©tin
source share