gpt4 book ai didi

magento - 在现有 Magento 观察者之前触发自定义观察者

转载 作者:行者123 更新时间:2023-12-05 00:37:30 25 4
gpt4 key购买 nike

有没有办法让您定制的观察者比在同一事件上触发的 Magento 具有更高的优先级。我的问题是我正在修改 Welcome 块的输出,但企业的 PageCache 在同一个 corecore_block_abstract_to_html_after 事件上触发。

我试着把它放在我的配置中,但它不像 cron 作业那样工作。

<core_block_abstract_to_html_after>
<observers>
<modify_welcome>
<type>singleton</type>
<class>groupname_page/observer</class>
<method>changeWelcomeText</method>
</modify_welcome>
<enterprise_pagecache>
<class>enterprise_pagecache/observer</class>
<method>renderBlockPlaceholder</method>
</enterprise_pagecache>
</observers>
</core_block_abstract_to_html_after>

最佳答案

/app/etc/modules/Groupname_Page.xml

<config>
<modules>
<Groupname_Page>
<active>true</active>
<codePool>local</codePool>
<depends>
<!-- Your dependencies go here -->
</depends>
</Groupname_Page>
<Enterprise_PageCache>
<depends>
<Groupname_Page />
</depends>
</Enterprise_PageCache>
</modules>
</config>

关于magento - 在现有 Magento 观察者之前触发自定义观察者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6836363/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com