Magento 模块 SQL 不运行

标签 magento installation magento-1.7 magento-1.6

我的模块将正确安装,并且所有相关文件均已正确安装。但数据库表尚未创建。

我已关注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/

相关文章:

php - 我无法删除 Magento 2.2.6 中生成的文件夹/代码

Magento 层导航从根类别开始

Magento 覆盖 block

在 Docker 上安装 Wordpress。试图跳过安装页面

magento 强制在时间之前执行 cron 作业

wix - 在 Wix 安装程序中以管理员模式在 customAction 中运行 ExeCommand

在手机中安装 Android

magento - SQLSTATE[40001] : Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction by Magento position

forms - Magento,在网格和表单后端添加并设置一个复选框

php - magento 获取捆绑产品下拉菜单