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

Creare tabel in baza de date
 
ivpdesign
Jr. Member
 
Total Posts:  7
Joined:  2012-07-29
 

Buna ziua, tot nu reusesc sa creez 2 tabele in baza de date.
Fac asa:

app/code/local/Easylife/Sales/etc/config.xml

<?xml version=\"1.0\"?>
<config>
<modules>
<Easylife_Sales>
<version>0.0.1</version>
</Easylife_Sales>
</modules>
<global>
<resources>
<easylife_sales_setup>
<setup>
<module>Easylife_Sales</module>
</setup>
</easylife_sales_setup>
</resources>
</global>
</config>

app/code/local/Easylife/Sales/sql/easylife_sales_setup/mysql4-install-0.0.1.php

<?php
$installer = $this;
$installer->startSetup();
$installer->run(”
CREATE TABLE IF NOT EXISTS {$this->getTable(’sales_quote_custom’)} (
`id` int(11) unsigned NOT NULL auto_increment,
`quote_id` int(11) unsigned NOT NULL,
`key` varchar(255) NOT NULL,
`value` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS {$this->getTable(’sales_order_custom’)} (
`id` int(11) unsigned NOT NULL auto_increment,
`order_id` int(11) unsigned NOT NULL,
`key` varchar(255) NOT NULL,
`value` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
“);
$installer->endSetup();

app/etc/modules/Easylife_Sales.xml

<?xml version=\"1.0\"?>
<config>
<modules>
<Easylife_Sales>
<active>true</active>
<codePool>local</codePool>
<depends><Mage_Sales/></depends><!-- asta e aici ca sa se incarce modulul tau dupa Mage_Sales -->
</Easylife_Sales>
</modules>
</config>

Sterg cache-ul si dau refresh.

Nu apar in baza de date tabelele. Nu stiu unde gresesc.

Daca poate cineva sa ma ajute.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Alecs00
Member
 
Total Posts:  73
Joined:  2011-05-03
 

Salut, incerca sa schimbi versiunea din 0.0.1 in 0.1.0 sau 1.0.0:

Aici <version>0.0.1</version> si mysql4-install-0.0.1.php in

Aici <version>0.1.0</version> si mysql4-install-0.1.0.php

Trebuie sa fie undeva in baza de date versiuna modulului, (0.0.1) si daca nu e o versiuna mai noua nu iti ruleaza fisierele.

Cum ar fi ca faci un update smile

Bafta,
Alex

 
Magento Community Magento Community
Magento Community
Magento Community
 
tzyganu
Mentor
 
Avatar
Total Posts:  2205
Joined:  2009-11-18
Bucharest, Romania
 

Salut.
Cauta in tabela core_resource inregistrarea cu campul ‘code’ egal cu ‘easylife_sales_setup’ si sterge-o.
Sterge cache-ul si incearca din nou.

Marius.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ivpdesign
Jr. Member
 
Total Posts:  7
Joined:  2012-07-29
 

Nu reusesc in nici un fel sa creez tabelul.

Poate doreste cineva sa imi arate unde gresesc prin team viewer.

La schimb pot sa inscriu 1 site in 100 de directoare, romanesti sau straine, 3 titluri si 3 descrieri diferite, adresa email pentru confirmarea inscrierilor o alegeti dvs.

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