I'm trying to run install script for my module and this is the first time for me, but it's not running and I can find my module in core_resource table. the module version is:
<Mdg_Gift>
<version>0.1.0</version>
</Mdg_Gift>
and the installer name is:
mysql4-install-0.1.0.php
I found this code area in app/code/core/Mage/Core/Model/Resource/Setup.php
$resModel = (string)$this->_connectionConfig->model;
$modName = (string)$this->_moduleConfig[0]->getName();
$filesDir = Mage::getModuleDir('sql', $modName) . DS . $this->_resourceName;
if (!is_dir($filesDir) || !is_readable($filesDir)) {
return array();
}
and printed out $filesDir
and it's value was:
G:\XAMPP\XAMPP\htdocs\citruss\app\code\ \Mdg\Gift\sql\mdg_gift_setup
the path is wrong and missing local codepool, I don't know what I should do. any help will be appreciated, thanks in advance.
update config.xml file is:
<?xml version="1.0"?>
<config>
<modules>
<Mdg_Gift>
<version>0.1.0</version>
</Mdg_Gift>
</modules>
<global>
<models>
<mdg_gift>
<class>Mdg_Gift_Model</class>
<resourceModel>mdg_gift_mysql4</resourceModel>
</mdg_gift>
<mdg_gift_mysql4>
<class>Mdg_Gift_Model_Mysql4</class>
<entities>
<entity>
<table>mdg_gift_entity</table>
</entity>
<item>
<table>mdg_gift_item</table>
</item>
<type>
<table>mdg_gift_type</table>
</type>
</entities>
</mdg_gift_mysql4>
</models>
<blocks>
<mdg_gift>
<class>Mdg_Gift_Block</class>
</mdg_gift>
</blocks>
<helpers>
<mdg_gift>
<class>Mdg_Gift_Helper</class>
</mdg_gift>
</helpers>
<resources>
<mdg_gift_setup>
<setup>
<module>Mdg_Gift</module>
<class>Mdg_Gift_Model_Resource_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</mdg_gift_setup>
<mdg_gift_write>
<connection>
<use>core_write</use>
</connection>
</mdg_gift_write>
<mdg_gift_read>
<connection>
<use>core_read</use>
</connection>
</mdg_gift_read>
</resources>
</global>
<frontend>
<routers>
<mdg_gift>
<use>standard</use>
<args>
<module>Mdg_Gift</module>
<frontName>gift</frontName>
</args>
</mdg_gift>
</routers>
</frontend>
</config>
also I can't route to IndexController.php file is there any mistake in my code and here is my IndexController.php file:
<?php
class Mdg_Gift_IndexController extends Mage_Core_Controller_Front_Action{
public function indexAction()
{
echo 'This is our test controller';
}
}
/app/etc/modules/Mdg_Gift.xml :
<config>
<modules>
<mdg_gift>
<active>true</active>
<codePool>local</codePool>
</mdg_gift>
</modules>
</config>
Mdg_Gift.xml
found inapp/etc/modules/
– MTM