Magento SQL module won't start

My module will be configured correctly and all relavant files will be installed correctly. But no database tables are created.

I followed this tutorial.

My config xml looks like this.

<?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>

      

I have a .php file named /sql/mygateway_setup/mysql4-install-1.0.0.php

but it won't start.

What i tried

  • Tried removing any entries from core_resource related to my module
  • Changing version numbers
  • Matchin version numbers

How can I fix this problem?

+3


source to share


2 answers


First of all change every word to lower case in your xml (for example to .second - create models in your xml, for example

           <mygateway_mysql4>
                <class>Mygateway_Model_Mysql4</class>
                <entities>
                    <mygateway>
                        <table>mygateway</table>
                    </mygateway>

                </entities>
            </mygateway_mysql4>

      



for details and step-by-step process you can check these articles Link1 , Link2 .

Hope it solves your problem.

0


source


Follow the instructions below in the admin panel.

Run compiler:

Admin => System => Tools => Compilation> Enable => Start the compilation process.



Re-index the data:

Admin => System => Index Management =>

Check the box and click "Re Index Data" in the dropdown list at the top right to submit.

+1


source







All Articles