Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在magento的“客户帐户编辑”页面上呈现自定义字段的“我的块”_Magento_Magento 1.9.3 - Fatal编程技术网

在magento的“客户帐户编辑”页面上呈现自定义字段的“我的块”

在magento的“客户帐户编辑”页面上呈现自定义字段的“我的块”,magento,magento-1.9.3,Magento,Magento 1.9.3,我想使用我的块添加一些自定义字段。 问题是块没有在表单标记内部或提交按钮之前呈现(请参见屏幕截图1)。 这是在帐户编辑页面上呈现块的代码: <?xml version="1.0" encoding="UTF-8"?> <layout version="1.0.0"> <customer_account_edit> <reference name="my.account.wrapper">

我想使用我的块添加一些自定义字段。 问题是块没有在表单标记内部或提交按钮之前呈现(请参见屏幕截图1)。 这是在帐户编辑页面上呈现块的代码:

<?xml version="1.0" encoding="UTF-8"?>
<layout version="1.0.0">
    <customer_account_edit>
        <reference name="my.account.wrapper">
                    <block type="customfield/Register" name="customfield_registrationnnn" template="vss_customfield/register.phtml" />
        </reference>
    </customer_account_edit>
</layout>

请帮帮我。 提前感谢。:)

只需使用before=“magento的模块名称”。
您可以在magento之前插入代码

实际上,在帐户编辑表单中没有用于插入新字段/自定义字段的钩子/句柄

您可以覆盖模块布局文件中的customer/form/edit.phtml

1) 将下面的代码片段放入模块的布局XML中

<customer_account_edit>
    <reference name="customer_edit">
        <action method="setTemplate">
            <template>yourModule/customer/form/edit.phtml</template>
        </action>
    </reference>
</customer_account_edit>

yourModule/customer/form/edit.phtml
2) 复制你的主题

customer/form/edit.phtml

yourModule/customer/form/edit.phtml

3) 现在,在新文件中,可以放置自定义字段