magento - mysql4-install-1.0.0.php file not working for Mageno 1.5 -


recently have created on custom magento extension , release found installtion file not install.

the installation file not creating tables.

i have following code in config.xml

<?xml version="1.0" ?> <config>     <modules>         <tricore_contactus>             <version>1.0.0</version>         </tricore_contactus>     </modules> . . . </config> 

i have created mysql4-install-1.0.0.php file in sql\contactus_setup folder inside extension below code.

$installer = $this; $installer->startsetup();  $installer->run("     insert ".mage::getconfig()->gettableprefix()."core_email_template  values     (null, 'tricore contact us', 'name: {{var data.name}}\r\ne-mail: {{var data.email}}\r\ntelephone: {{var data.mobilenumber}}\r\n\r\ncomment: {{var data.message}}', null, 1, 'contact form', null, null, null, '2013-04-23 11:04:45', 'contacts_email_email_template', '{\"var data.name\":\"sender name\",\"var data.email\":\"sender email\",\"var data.telephone\":\"sender telephone\",\"var data.comment\":\"comment\"}'),     (null, 'tricore auto respond', 'dear {{var data.name}}\r\n\r\nwe have got submitted information.\r\n\r\ne-mail: {{var data.email}}\r\nelephone: {{var data.mobilenumber}}\r\n\r\ncomment: {{var data.message}}\r\n\r\nour representative respond soon.\r\n', null, 1, 'autoreply ', null, null, null, '2013-04-23 11:07:46', 'contacts_email_email_template', '{\"var data.name\":\"sender name\",\"var data.email\":\"sender email\",\"var data.telephone\":\"sender telephone\",\"var data.comment\":\"comment\"}'); "); $installer->endsetup(); 

when extension install add entry core_resource table not insert reocrd core_email_template table.

sometime not call mysql4-install-1.0.0.php file.enter code here

please help.

thanks

everything you've posted seems right. maybe forgot following http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-6-magento-setup-resources

in case xml be:

 <global>     <!-- ... -->     <resources>         <contactus_setup>             <setup>                 <module>tricore_contactus</module>                 <class>mage_eav_model_entity_setup</class>             </setup>         </contactus_setup>         <contactus_write>              <connection>                 <use>core_write</use>             </connection>         </contactus_write>         <contactus_read>             <connection>                 <use>core_read</use>             </connection>         </contactus_read>     </resources>     <!-- ... --> </global>  

also on sidenote: debugging add die("sql-script running") @ bottom of mysql4-...php can sure, code @ least executed - , if sql doesn't applied, can hit f5 until works (in contrast change core_resources entry time).. , if "die" doesn't display can sure, xml problem


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -