Is there a way to override resource models? #4001
-
I tried to override the resource model Mage_Reports_Model_Resource_Product_Collection I used the default approach to override the model in the config.xml <global>
<models>
<tenretni_reports>
<class>Tenretni_Reports_Model</class>
</tenretni_reports>
<reports>
<rewrite>
<resource_product_collection>Tenretni_Reports_Model_Resource_Product_Collection</resource_product_collection>
</rewrite>
</reports>
</models>
</global> after exhausting all other options / solutions i have knowledge about , i just wonder if its at all possible to override ( i know that i can use a mirrored file in local/Mage to override the whole file , but i wanted to avoid this approach. ) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
what if you override both the model and the resourcemodel? |
Beta Was this translation helpful? Give feedback.
-
To override a resource model, here magento-lts/app/code/core/Mage/Reports/etc/config.xml Lines 24 to 30 in e228538 |
Beta Was this translation helpful? Give feedback.
To override a resource model, here
Mage_Reports_Model_Resource_Product_Collection
, you must usereports_resource
and notreports
:magento-lts/app/code/core/Mage/Reports/etc/config.xml
Lines 24 to 30 in e228538