在自定义模块magento中添加新字段

时间:2018-06-29 14:54:53

标签: magento backend

我想在magento的后端以自定义表单添加一个字段,该表单位于Block / Adminhtml / Controladata / Edit / Form.php中,我打算通过system.xml进行放置,我该怎么做?此表单位于Sales -> Custom Menu Item -> Grid (Choose the option) -> Form中。我尝试了以下方法。我使用的声明名称是adminhtml.xml中的名称,该形式的ID为$this-> setId ('calendario_controladata_form');,位于Form.php文件中

<menu>
    <sales>
        <children>
            </calendario_controladata>
        </children>
    </sales>
</menu>

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <sections>
        <calendario_controladata translate="label" module="calendario">
            <groups>
                <periodos_group translate="label" module="calendario">
                    <fields>
                         <label>Madrugada - Periodo DEFAULT</label>
                         <frontend_type>text</frontend_type>
                         <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>
                            <madrugada_default translate="label">
                                <label>Madrugada - Periodo DEFAULT</label>
                                <comment></comment>
                                <frontend_type>time</frontend_type>
                                <sort_order>20</sort_order>
                                <show_in_default>1</show_in_default>
                                <show_in_website>1</show_in_website>
                                <show_in_store>1</show_in_store>
                        </madrugada_default>
                    </fields>
                </periodos_group>
            </groups>
        </calendario_controladata>
    </sections>
</config>

0 个答案:

没有答案
相关问题