2013-03-01 63 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还是是应该可以工作。