我正在寻找为 noRoute 操作覆盖 cms Controller 的示例。我正在尝试让我的 404 页面在发生时向我发送电子邮件。
我关注了this tutorial并完全按照写的去做,但没有任何反应。
我又用谷歌搜索了一些 found this这对我也不起作用。
我的 Magento 版本是 1.5.0.0-rc1。
谁能给我一些教程或示例代码的链接?非常感谢!
最佳答案
我进行了一些尝试/错误研究并设法创建了我的模块。经过大量搜索,我发现 Magento 对 404 页面使用自定义无路由 Controller (此页面是黄金:http://alanstorm.com/magentos_many_404_pages)。这可以设置如下:
在“系统 -> 配置 -> Web -> 默认页面”下,我更改了默认无路由 URL 的设置,它现在指向我定制的 Controller 。
我基本上是从现有的 CMS IndexController 复制内容并添加我自己的逻辑(发送电子邮件和显示搜索表单)。就是这样,它对我有用。
谢谢大家。
关于magento - 为 noRoute 操作覆盖 magento cms Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7737500/