Magento EE - Enterprise registrazione
-
16-10-2019 - |
Domanda
Ho piccolo problema. Ho creato il mio modulo a livello locale, vorrei aggiungere registri per Salva / modifica / operazioni di eliminazione con il modulo di registrazione Enterprise.
Ho creato logging.xml a dir etc
app / code / local / AB / Caratteristica / etc
<logging>
<characteristic translate="label">
<label>Characteristics</label>
<expected_models>
<characteristic__characteristic />
</expected_models>
<actions>
<characteristic_adminhtml_characteristic_save>
<action>save</action>
</characteristic_adminhtml_characteristic_save>
</actions>
</characteristic></logging>
Quello che sto facendo male? Nulla, salvo a / admin / logging /.
Soluzione
A mio parere si dispone di alcune confusioni a logging.xml scrittura. Vedere il mio campione e mi spiego:
config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Ssd_Faq>
<active>true</active>
<codePool>local</codePool>
<version>1.1.3</version>
</Ssd_Faq>
</modules>
<admin>
<routers>
<adminhtml>
<args>
<modules> <!--here admin router uses adminhtml route and <actions> node should has value adminhtml_faq_save -->
<Ssd_Faq before="Mage_Adminhtml">Ssd_Faq_Adminhtml</Ssd_Faq>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<!-- here if you use custom route for admin
<admin>
<routers>
<some_module_node>
<use>admin</use>
<args>
<module>Some_Module</module>
<frontName>someroute</frontName>
</args>
</some_module_node>
</routers>
</admin> -->
<!-- some nodes -->
<global>
<models>
<ssd_faq> <!-- ssd_faq is my custom model name and <expected_models> node should has value ssd_faq__faq in logging.xml -->
<class>Ssd_Faq_Model</class>
<resourceModel>ssd_faq_mysql4</resourceModel>
</ssd_faq>
<!-- some nodes -->
</models>
<!-- some nodes -->
</global>
</config>
logging.xml:
<?xml version="1.0"?>
<logging>
<Ssd_Faq translate="label">
<label>FAQ</label>
<expected_models>
<ssd_faq__faq/> <!--my model name is ssd_faq and I have Faq.php in Model folder-->
</expected_models>
<actions>
<adminhtml_faq_save> <!--I use adminhtml route and I have FaqController.php in controllers/Admihtml folder-->
<action>save</action>
</adminhtml_faq_save>
<someroute_somecontroller_save> <!--If you use custom route-->
<action>save</action>
</someroute_somecontroller_save>
<!-- if you have some doubts where to find nodes like someroute_somecontroller_save or adminhtml_faq_save, open your controller and write this little debug code in particular action: echo $this->getFullActionName();die; You should write wull action name in the actions node. -->
</actions>
</Ssd_Faq>
</logging>
E, infine, si dovrebbe accendere la registrazione attraverso admin->configuration->admin->admin actions logging
e verificare [Characteristics]
e salvare la configurazione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange