我的模块将正确安装,并且所有相关文件均已正确安装。但数据库表尚未创建。
我已关注this教程。
我的配置 xml 如下。
<?xml version="1.0"?>
<config>
<modules>
<Myname_Mygateway>
<version>1.0.0</version>
</Myname_Mygateway>
</modules>
<global>
<resources>
<Mygateway_setup>
<setup>
<module>Myname_Mygateway</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</Mygateway_setup>
<Mygateway_write>
<connection>
<use>core_write</use>
</connection>
</Mygateway_write>
<Mygateway_read>
<connection>
<use>core_read</use>
</connection>
</Mygateway_read>
</resources>
<models>
<mygateway>
<class>Myname_Mygateway_Model</class>
</mygateway>
</models>
<helpers>
<mygateway>
<class>Myname_Mygateway_Helper</class>
</mygateway>
</helpers>
<blocks>
<mygateway>
<class>Myname_Mygateway_Block</class>
</mygateway>
</blocks>
</global>
<default>
<payment>
<mygateway>
<model>mygateway/standard</model>
<active>1</active>
<order_status>pending</order_status>
<title>My Gateway</title>
<payment_action>sale</payment_action>
<allowspecific>0</allowspecific>
<sort_order>1</sort_order>
</mygateway>
</payment>
</default>
<frontend>
<routers>
<mygateway>
<use>standard</use>
<args>
<module>Myname_Mygateway</module>
<frontName>mygateway</frontName>
</args>
</mygateway>
</routers>
</frontend>
</config>
我有一个名为 /sql/mygateway_setup/mysql4-install-1.0.0.php
的 .php 文件,但它无法运行。
我尝试了什么
- 尝试从 core_resource 中删除与我的模块相关的所有条目
- 更改版本号
- 匹配版本号
如何解决这个问题?
最佳答案
按照以下步骤进入管理面板。
运行编译器:
管理=>系统=>工具=>编译>启用=>运行编译过程。
重新索引数据:
管理=>系统=>索引管理=>
选中所有复选框,然后单击右上角下拉列表中的“重新索引数据”以提交。
关于Magento 模块 SQL 不运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14868228/