Je suis un débutant avec Magento et j'ai commencé à développer une petite extension. Je l'avais déjà installé et tout allait bien. Mais pour une raison quelconque, j'ai décidé de le réinstaller. J'ai supprimé des lignes de la table core_resource, j'ai également supprimé les tables de modules de DB. Dans le fichier de configuration .xml j'ai mis fauxMagento 1.9 script d'installation ne fonctionne pas
Maintenant l'extension ne fonctionne pas (bien sûr). Mais il apparaît toujours dans Configuration -> Avancé -> Sortie du module! Et je n'ai aucune idée pourquoi. J'ai même juste enlevé tous les fichiers et dossiers à partir du répertoire, je cache Magento raclé (qui est en fait défini comme « désactivé » dans mon système)
Voici config.xml:
<?xml version="0.0.1" encoding="UTF-8" ?>
<config>
<modules>
<Anglingdirect_Jobadverts>
<version>0.0.1</version>
</Anglingdirect_Jobadverts>
</modules>
<global>
<helpers>
<jobadverts>
<class>Anglingdirect_Jobadverts_Helper</class>
</jobadverts>
</helpers>
<blocks>
<jobadverts>
<class>Anglingdirect_Jobadverts_Block</class>
</jobadverts>
</blocks>
<models>
<jobadverts>
<class>Anglingdirect_Jobadverts_Model</class>
<resourceModel>jobadverts_mysql4</resourceModel>
</jobadverts>
<jobadverts_mysql4>
<class>Anglingdirect_Jobadverts_Model_Mysql4</class>
<entities>
<advert>
<table>job_adverts</table>
</advert>
<category>
<table>job_categories</table>job
</category>
<application>
<table>job_applications</table>
</application>
<location>
<table>aw_storelocator_location</table>
</location>
</entities>
</jobadverts_mysql4>
</models>
<resources>
<jobadverts_setup>
<setup>
<module>Anglingdirect_Jobadverts</module>
<class>Anglingdirect_Jobadverts_Model_Mysql4_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</jobadverts_setup>
<jobadverts_read>
<connection>
<use>core_read</use>
</connection>
</jobadverts_read>
<jobadverts_write>
<connection>
<use>core_write</use>
</connection>
</jobadverts_write>
</resources>
</global>
<frontend>
<routers>
<jobadverts>
<use>standard</use>
<args>
<module>Anglingdirect_Jobadverts</module>
<frontName>career</frontName>
</args>
</jobadverts>
</routers>
<layout>
<updates>
<jobadverts>
<file>jobadverts.xml</file>
</jobadverts>
</updates>
</layout>
</frontend>
<admin>
<routers>
<jobadverts>
<use>admin</use>
<args>
<module>Anglingdirect_Jobadverts</module>
<frontName>adminhtml_jobadverts</frontName>
</args>
</jobadverts>
</routers>
</admin>
<!--<admin>-->
<!--<routers>-->
<!--<Anglingdirect_Jobadverts>-->
<!--<use>admin</use>-->
<!--<args>-->
<!--<module>Anglingdirect_Jobadverts</module>-->
<!--<frontName>admin_jobadverts</frontName>-->
<!--</args>-->
<!--</Anglingdirect_Jobadverts>-->
<!--</routers>-->
<!--</admin>-->
<adminhtml>
<menu>
<adextensions module="anglingdirect_jobadverts">
<title>AD Extensions</title>
<sort_order>100</sort_order>
<children>
<jobadverts module="jobadverts">
<title>Job adverts</title>
<sort_order>150</sort_order>
<children>
<application module="jobadverts">
<title>Post a job</title>
<sort_order>0</sort_order>
<action>adminhtml_jobadverts/adminhtml_advert/new</action>
</application>
<advert module="jobadverts">
<title>Job management</title>
<sort_order>10</sort_order>
<action>adminhtml_jobadverts/adminhtml_advert/index</action>
</advert>
<browse module="jobadverts">
<title>Job applications</title>
<sort_order>20</sort_order>
<action>adminhtml_jobadverts/adminhtml_application</action>
</browse>
</children>
</jobadverts>
</children>
</adextensions>
</menu>
<layout>
<updates>
<jobadverts module="jobadverts">
<file>jobadverts.xml</file>
</jobadverts>
</updates>
</layout>
</adminhtml>
</config>
Voici mon installation scripts mysql4-install-0.1.0.php:
<?php
/* @var $installer Mage_Catalog_Model_Resource_Setup */
$installer->startSetup();
// anglingdirect_jobadverts/job_adverts
$table_adv = $installer->getConnection()
->newTable($installer->getTable('job_adverts'))
->addColumn('job_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
'identity' => true,
'unsigned' => true,
'nullable' => false,
'primary' => true,
),'job post id')
->addColumn('job_cat_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
'nullable' => false,
),'Job category ID')
->addColumn('job_title', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
),'Job Title')
->addColumn('job_hours', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
),'Working time')
->addColumn('job_salary', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
),'Salary')
->addColumn('job_location', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
'nullable' => false,
),'Location')
->addColumn('job_active', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
'nullable' => false,
), 'Advert status: removed, active')
->addColumn('job_descr', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
), 'Full job description')
->setComment('Job adverts table');
$table_app = $installer->getConnection()->newTable($installer->getTable('job_applications'))
->addColumn('job_app_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
'identity' => true,
'unsigned' => true,
'nullable' => false,
'primary' => true,
),'job post id')
->addColumn('job_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
'nullable' => false,
),'Application ID')
->addColumn('applicant_name', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
),'Applicant full name')
->addColumn('applicant_email', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
),'Contact email')
->addColumn('applicant_letter', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
),'Motivation letter')
->addColumn('applicant_cv', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
),'path to file with cv')
->addColumn('applicant_status', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
'nullable' => false,
), 'Applicant succeed, application declined, removed')
->setComment('Job applications table');
$table_cat = $installer->getConnection()->newTable($installer->getTable('job_categories'))
->addColumn('job_cat_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
'identity' => true,
'unsigned' => true,
'nullable' => false,
'primary' => true,
),'Category ID')
->addColumn('job_cat_path', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
),'Category title')
->addColumn('job_cat_title', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
),'Category title')
->addColumn('job_cat_image', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
'nullable' => false,
),'Category image')
->addIndex($installer->getIdxName('job_categories', array('job_cat_id')),array('job_cat_id'))
->setComment('Job categories table');
$installer->getConnection()->createTable($table_adv);
$installer->getConnection()->createTable($table_app);
$installer->getConnection()->createTable($table_cat);
$installer->endSetup();
est une structure de dossier ici: Screenshot of my extension folder structure
Comment puis-je réinstaller mes extensomètres ion dans cette situation? Aidez-nous
Vous n'avez pas besoin de cette classe, vous pouvez utiliser les classes de configuration de base - il importe simplement quelle classe de ressources que vous avez défini dans votre config.xml :) –