在magento的“客户帐户编辑”页面上呈现自定义字段的“我的块”
我想使用我的块添加一些自定义字段。 问题是块没有在表单标记内部或提交按钮之前呈现(请参见屏幕截图1)。 这是在帐户编辑页面上呈现块的代码:在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">
<?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) 现在,在新文件中,可以放置自定义字段