Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Problem with rewrite
 
Rafal
Member
 
Total Posts:  42
Joined:  2007-11-22
Munich
 

Hello,

I have read posts in forum about rewrite. I implement in the way as it’s described there.
Unfortunately it doesn’t work for me.
I want to overwrite Mage_Catalog_Model_Product and add my method.
My app/code/local/Mage/MyModule/etc/config.xml:

<config>
  <
modules>
    <
Mage_MyModule>
      <
version>0.1.0</version>
    </
Mage_MyModule>
  </
modules>

  <global>
    <
models>
      <
mymodule>
        <class>
Mage_MyModule_Model</class>
      </
mymodule>
      <
catalog>
        <
rewrite>
          <
product>Mage_MyModule_Model_Product</product>
    </
rewrite>
      </
catalog>
    </
models>

    <
resources>
      <
liteimodule_setup>
        <
setup>
          <
module>Mage_LiteiModule</module>
    </
setup>
        <
connection>
          <use>
core_setup</use>
    </
connection>
      </
liteimodule_setup>
    </
resources>
  </global>
</
config>

It doesn’t call my method in Mage_MyModule_Model_Product.

Any idea what’s wrong ?

Maybe do I have to somehow to activate my extension ?
But it seems to be “activated” because it has created the field in the database (definded in mysql4-install-0.0.1.php).

I use release from november but I’ll use the last one soon.

with best regards,
Rafal

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael_1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 
Rafal - 11 December 2007 01:19 AM

Maybe do I have to somehow to activate my extension ?

You can try to add the following to your app/etc/config.xml:

<config>
    <
modules>
       .......
        <
Mage_MyModule>
            <
active>true</active>
            <
codePool>local</codePool>
        </
Mage_MyModule>
    <
modules>
<
config>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Rafal
Member
 
Total Posts:  42
Joined:  2007-11-22
Munich
 

Thank you for answer.

I made it before but ... I mistyped wink
I corrected it about 2 weeks ago and it works perfectly.

with best regards,
Rafal

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top