Global posts on the CMS Magento page

I added mxpert login to the CMS homepage of my Magento site. I would like to upload global messages to this login in order to show clients if they have a login error.

thank

+3
source share
2 answers

Using this:

<?php echo
    Mage::app()->getLayout()->getMessagesBlock()->
        setMessages(Mage::getSingleton('customer/session')->getMessages(true))->getGroupedHtml() 
?>
+7
source

By default, Magento provides a mini-login feature that you can always use, no matter where the user is located. Thus, on all pages (including CMS pages), the user can log in using the mini-login function.

, - , Magento , . - Magento, .

, .


EDIT: -
Magento ( ), (//) . front-end, : <?php echo $this->getChildHtml('global_messages') ?>.
(, "1column.phtml", "2columns-left.phtml" ..), "app/design/frontend/base/default/template/page/". , XML "global_messages", .

, Magento . , ( ) , / . , , . , , Magento , ( ). , , .

, , , , ( , "app/design/frontend/base/default/template/page/", "1column.phtml", "2columns-left.phtml" ) : -
<?php echo $this->getChildHtml('global_messages') ?>.

+1

Source: https://habr.com/ru/post/1796350/


All Articles