magento - 管理员登录后打开弹出窗口

时间:2015-05-19 11:06:05

标签: magento

我想在管理员成功登录时显示弹出窗口。我有一个带有config.xml文件的自定义模块Setstore_Notification -

<config>
  <modules>
    <Setstore_Notification>
        <version>0.0.1</version>
    </Setstore_Notification>
  </modules>
  <global>
  <events>
    <admin_session_user_login_success>
      <observers>
        <Setstore_Notification_customer_register_success>
          <type>singleton</type>
            <class>Setstore_Notification_Model_Observer</class>
          <method>choosestore</method>
        </Setstore_Notification_customer_register_success>
     </observers>
    </admin_session_user_login_success>
  </events>
  </global>
</config>

和模型中的观察者文件 -

<?php
class Setstore_Notification_Model_Observer {
    public function choosestore(Varien_Event_Observer $observer) {

        $event = $observer->getEvent();

        $layout = $observer->getEvent()->getLayout();        

        -----


    }
}
?>

我不明白如何在观察者文件中调用弹出窗口。我在信息中心页面中添加了window.js

感谢任何帮助。

感谢。

1 个答案:

答案 0 :(得分:0)

通过渲染块

来实现
org.restlet.resource.Resource.getRequest().getClientInfo().getPermissions()

里面的hello块是

$this->loadLayout();
$layout = $this->getLayout();
$block = $layout->getBlock("hello");
echo $block->toHtml();

另一种渲染cms页面的方法

<script>doPopup();</script>
相关问题