magento - 在 magento 的自定义模块中找不到页面
问题描述
我收到以下错误:
404 Error
Page not found.
一切看起来都不错,我已经从后端清除了缓存、注销和登录,还重置了权限,但仍然出现此错误。
我的代码:等/模块:Cloud_Freeshipping.xml
<?xml version="1.0"?>
<config>
<modules>
<Cloud_Freeshipping>
<active>true</active>
<codePool>community</codePool>
</Cloud_Freeshipping>
</modules>
</config>
app/code/community/Cloud/Freeshipping/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Cloud_Freeshipping>
<version>1.0.0</version>
</Cloud_Freeshipping>
</modules>
<global>
<helpers>
<cloud_freeshipping>
<class>Cloud_Freeshipping_Helper</class>
</cloud_freeshipping>
</helpers>
</global>
</config>
app/code/community/Cloud/Freeshipping/etc/adminhtml.xml
<?xml version="1.0"?>
<config>
<acl>
<resources>
<admin>
<children>
<system>
<children>
<config>
<children>
<cloud_freeshipping translate="title">
<title>FreeShipping Notification</title>
</cloud_freeshipping>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</config>
app/code/community/Cloud/Freeshipping/etc/system.xml
<?xml version="1.0"?>
<config>
<tabs>
<cloud_freeshipping translate="label">
<label>Free Shipping Notification</label>
<sort_order>1</sort_order>
</cloud_freeshipping>
</tabs>
<sections>
<cloud_freeshipping translate="label">
<tab>cloud_freeshipping</tab>
<label>Configuration</label>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<basic_config translate="label">
<label>Basic Config</label>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<total_cart translate="label">
<label>Valor de Envio</label>
<frontend_type>text</frontend_type>
<sort_order>2</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Selecione o total do valor para free shipping</comment>
</total_cart>
</fields>
</basic_config>
</groups>
</cloud_freeshipping>
</sections>
</config>
app/code/community/Cloud/Freeshipping/Helper/Data.php
class Cloud_Freeshipping_Helper_Data extends Mage_Core_Helper_Abstract
{
}
解决方案
在文件 app/code/community/Cloud/Freeshipping/etc/adminhtml.xml 中,尝试添加<all>
标签,<admin>
如下所示:
<?xml version="1.0"?>
<config>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<system>
<children>
<config>
<children>
<cloud_freeshipping translate="title">
<title>FreeShipping Notification</title>
</cloud_freeshipping>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</config>
然后注销并再次登录到管理员。
推荐阅读
- php - 在函数中使用 required_once mysqli 的最佳实践?
- python - 在日志文件中存储未处理的异常
- node.js - 在 expo 反应本机项目上 npm start/expo 启动期间出错
- python - Python - 删除不需要的字符串部分,获取特定的字符串
- html - 如何在模态内容中居中对齐按钮?
- github - 如何将目录从 PyCharm 上传到 GitHub 上的现有存储库?
- floating-point - 浮点运算中隐藏位的截断错误
- html - bash 卷曲 | grep 特定网站内容
- c++ - 尝试读取 json 文件时编码不切换
- php - 将特定用户角色的 WooCommerce 管理员订单限制为特定订单状态