2013-03-01 41 views
0

如何將默認值分配給我在system.xml文件中定義的配置值?目前它默認爲'不',但我希望它默認爲'是'。爲配置定義值設置默認值?

這是我目前的定義代碼:

<catalog> 
      <groups> 
       <my_val> 
        <label>My Label</label> 
        <frontend_type>text</frontend_type> 
        <sort_order>160</sort_order> 
        <show_in_default>1</show_in_default> 
        <show_in_website>1</show_in_website> 
        <show_in_store>1</show_in_store> 
        <fields> 
         <my_inner_val translate='label comment'> 
          <label>Enable seperate cart items</label> 
          <frontend_type>select</frontend_type> 
          <source_model>adminhtml/system_config_source_yesno</source_model> 
          <sort_order>1</sort_order> 
          <show_in_default>1</show_in_default> 
          <show_in_website>1</show_in_website> 
          <show_in_store>1</show_in_store> 
         </my_inner_val> 
        </fields> 
       </my_val> 
      </groups> 
     </catalog> 
+0

http://magento.stackexchange.com/ – hakre 2013-03-01 17:50:12

回答

0

在你的config.php文件,你可以設置那些

<default> 
    <catalog> 
     <my_val> 
      <my_inner_val>###</my_inner_val> 
     </... 

我不能完全肯定的價值,你就需要將在對於###,無論是1還是是應該可以工作。