Answer the question
In order to leave comments, you need to log in
Magento and resource file path?
The class contains the correct path to the file, but the following error pops up:
Fatal error: Class 'My_Articles_Model_Resource_Setup' not found in C:\xampp\htdocs\magento3.dev\app\code\core\Mage\Core\Model\Resource\Setup. php
Why is this file being looked for in the core folder and not local?
config.xml:
<?xml version="1.0" ?>
<config>
<modules>
<My_Articles>
<version>1.0.0</version>
</My_Articles>
</modules>
<frontend>
<routers>
<marticles>
<use>standard</use>
<args>
<module>My_Articles</module>
<frontName>articles</frontName>
</args>
</marticles>
</routers>
</frontend>
<global>
<resources>
<Articles_setup>
<setup>
<module>My_Articles</module>
<class>My_Articles_Model_Resource_Setup</class>
</setup>
</Articles_setup>
</resources>
</global>
</config>
Answer the question
In order to leave comments, you need to log in
You didn't declare a resource for the model, it should be in global->models
...
<global>
<models>
<myarticles>
<class>My_Articles_Model</class>
<resourceModel>myarticles_resource</resourceModel>
</myarticles>
<myarticles_resource>
<class>My_Articles_Model_Resource</class>
<entities>
<article>
<table>myarticles</table>
</article>
</entities>
</myarticles_resource>
</models>
...
</global>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question