2013-03-26 69 views
1

這是我第一次嘗試構建模塊,但是,下面的組<categorylog>中的某些內容已損壞。第一組<productlog>工作正常。到目前爲止,這在System-> Configuration中創建了一個名爲Frank的新選項卡,其中有一個稱爲正確日誌的部分。任何人都可以看到什麼是錯的組?Magento模塊 - 第二組不顯示

<config> 
<tabs> 
    <frank> 
     <label>Frank</label> 
     <sort_order>100</sort_order> 
    </frank> 
</tabs> 
<sections> 
    <properlog> 
     <tab>frank</tab> 
     <class>separator-top</class> 
     <label>Proper Log</label> 
     <sort_order>100</sort_order> 
     <show_in_default>1</show_in_default> 
     <show_in_website>1</show_in_website> 
     <show_in_store>1</show_in_store> 

     <groups> 
      <productlog> 
       <label>Product Logs</label> 
       <frontend_type>text</frontend_type> 
       <show_in_default>1</show_in_default> 
       <show_in_website>1</show_in_website> 
       <show_in_store>1</show_in_store> 
       <sort_order>100</sort_order> 
       <fields> 
        <product_logs_enabled> 
         <label>Enable Product Logs</label> 
         <comment>Set to yes to log product updates</comment> 
         <frontend_type>select</frontend_type> 
         <source_model>adminhtml/system_config_source_yesno</source_model> 
         <show_in_default>1</show_in_default> 
         <show_in_website>1</show_in_website> 
         <show_in_store>1</show_in_store> 
         <sort_order>10</sort_order> 
        </product_logs_enabled> 

        <attributes_to_track> 
         <label>Attributes to Track</label> 
         <frontend_type>textarea</frontend_type> 
         <comment>comma deliminated list of product attribues (eg. type,name,box_width)</comment> 
         <show_in_default>1</show_in_default> 
         <show_in_website>1</show_in_website> 
         <show_in_store>1</show_in_store> 
         <sort_order>20</sort_order> 
        </attributes_to_track> 
       </fields> 
      </productlog> 

      <categorylog> 
       <label>Category Logs</label> 
       <frontend_type>text</frontend_type> 
       <show_in_default>1</show_in_default> 
       <show_in_website>1</show_in_website> 
       <show_in_store>1</show_in_store> 
       <sort_order>200</sort_order> 
       <fields> 
        <category_logs_enabled> 
         <label>Enable Category Logs</label> 
         <comment>Set to yes to log category updates</comment> 
         <frontend_type>select</frontend_type> 
         <source_model>adminhtml/system_config_source_yesno</source_model> 
         <sort_order>10</sort_order> 
        </category_logs_enabled> 
       </fields> 
      </categorylog> 

     </groups> 
    </properlog> 
</sections> 

回答

1

你缺少show_in值;默認的行爲是不顯示

<sections> 
    <properlog> 
     <groups> 
      <categorylog> 
       <fields> 
        <category_logs_enabled> 
         <label>Enable Category Logs</label> 
         <comment>Set to yes to log category updates</comment> 
         <frontend_type>select</frontend_type> 
         <source_model>adminhtml/system_config_source_yesno</source_model> 
         <sort_order>10</sort_order> 
         <!-- add these --> 
         <show_in_default>1</show_in_default> 
         <show_in_website>1</show_in_website> 
         <show_in_store>1</show_in_store> 
        </category_logs_enabled> 
       </fields> 
      </categorylog> 
     </groups> 
    </properlog> 
</sections> 
+0

是啊,我意識到這一點以後。但是你知道這是什麼時候你一直在看東西太久。謝謝! – 2013-04-02 18:12:48