1

I have a custom module that I can't get to activate. I have the following in app/etc/modules/DBCustom_Quote:

<config>
    <modules>
        <DBCustom_Quote>
            <active>true</active>
            <codePool>local</codePool>
        </DBCustom_Quote>
    </modules>
</config>

And the following in app/code/local/DBCustom/Quote/etc/config.xml:

<config>
    <modules>
        <DBCustom_Quote>
            <version>1.0.0</version>
        </DBCustom_Quote>
    </modules>
    <global>
        <models>
            <dbcustom_quote>
                <class>DBCustom_Quote_Model</class>
            </dbcustom_quote>
        </models>
        <events>
            <ophirah_qquoteadv_admin_swith2Quote_after>
                <observers>
                    <dbcustom_sendemail>
                        <class>DBCustom_Quote_Model_Observer</class>
                        <method>sendEmail</method>
                        <type>singleton</type>
                    </dbcustom_sendemail>
                </observers>
            </ophirah_qquoteadv_admin_swith2Quote_after>
        </events>
    </global>
</config>

But it won't show up in Admin->Configuration->Advanced->Advanced. I have tried flushing the cache multiple times through the admin Cache Management page and through the CLI and none of it works. Is there something I'm missing?

1
  • Hey Did you check your module entry in "core_resource" table. Commented Feb 15, 2019 at 3:41

1 Answer 1

1

Try this:

Firstly the app/etc/modules/DBCustom_Quote needs to be app/etc/modules/DBCustom_Quote.xml - note the missing .xml file extension.

Secondly, you need the xml file declaration at the top of any XML files:

So, app/etc/modules/DBCustom_Quote.xml is like this:

<?xml version="1.0"?>
<config>
    <modules>
        <DBCustom_Quote>
            <active>true</active>
            <codePool>local</codePool>
        </DBCustom_Quote>
    </modules>
</config>

and app/code/local/DBCustom/Quote/etc/config.xml is like this:

<?xml version="1.0"?>
<config>
    <modules>
        <DBCustom_Quote>
            <version>1.0.0</version>
        </DBCustom_Quote>
    </modules>
    <global>
        <models>
            <dbcustom_quote>
                <class>DBCustom_Quote_Model</class>
            </dbcustom_quote>
        </models>
        <events>
            <ophirah_qquoteadv_admin_swith2Quote_after>
                <observers>
                    <dbcustom_sendemail>
                        <class>DBCustom_Quote_Model_Observer</class>
                        <method>sendEmail</method>
                        <type>singleton</type>
                    </dbcustom_sendemail>
                </observers>
            </ophirah_qquoteadv_admin_swith2Quote_after>
        </events>
    </global>
</config>

Finally, flush/clear the cache. This is essential after making any XML changes.

This is tested and working for me on Magento 1.9.x

1
  • Of course, the module DBCustom_Quote wasn't an xml file. It's always some stupid little thing that's so obvious, you don't bother checking it. Thank you very much.
    – Eric Brown
    Commented Feb 15, 2019 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.