在做Magento的模块的过程中,经常能碰到明明文件已经存在了,在页面上却爆出
Warning: include(MageLilysoftSearchorderHelperData.php) [function.include]: failed to open stream: No such file or directory
在我的模块文件夹中,其实已经存在 applocalLilysoftSearchorderHelperData.php 文件了,但是却无法找到,因为无法定位到模块中,因此才去Mage中找,自然也找不到。
问题往往处在配置文件中,即config文件和layout文件。
比如出问题的 layout文件截取
<layout>
<customer_logged_out>
<reference name="top.links">
<action method="addLink" translate="label title" module="lilysoft_searchorder">
<label>订单查询</label>
<url helper="searchorder/getSearchOrderUrl"/>
<title>订单查询</title>
<prepare/>
<urlParams/>
<position>102</position>
</action>
</reference>
</customer_logged_out>
。。。。。。。。。
</layout>
配置文件config.xml截取
只截取 global节点
<global>
<blocks>
<searchorder>
<class>LilySoft_SearchOrder_Block</class>
</searchorder>
</blocks>
<models>
<searchorder>
<class>LilySoft_SearchOrder_Model</class>
</searchorder>
</models>
<helpers>
<searchorder>
<class>LilySoft_SearchOrder_Helper</class>
</searchorder>
</helpers>
</global>
看到config.xml中标记红字的地方,这个地方的标签名称只用模块名称的小写就可以,不用添加上 lilysoft_前缀。
同样的,如果config.xml这样设置,而layout文件中的 module 用了 lilysoft_searchorder
也是会报错的,应该改为 searchorder。(责任编辑:最模板) |

黑色苹果简洁风格|ecshop外
人气:1458
shopex精仿凡客网站模板
人气:1249
ecshop台湾地区分区信息
人气:1162
shopex仿爱情鸟模板
人气:425
ecshop仿烧包网模板|包包模
人气:597
ecshop仿万表网2014网店模板
人气:941