自定义表单上的自定义客户属性

问题描述

| 我有4个自定义属性添加到客户帐户创建/编辑表单中。我也有一个模板,该模板基本上是现有注册表的精确副本。唯一的区别是,我在另一个模块中使用了它,而后期操作则通过ajax完成。 我遇到的问题是自定义属性显示自定义模板上。 到目前为止,我的研究表明我需要将“要使用的表单”的值添加属性中。我是通过重写Enterprise_Customer_Helper_Data类来完成的。但是,这仍然不起作用,自定义属性不会显示在我创建的自定义模板上。 这是我在重写中覆盖的更新方法。使用的新表格是“愿望清单注册”。值是我的布局xml文件中的布局句柄。 任何帮助,我们将不胜感激。
    public function getCustomerAttributeFormOptions()
{
    return array(
        array(
            \'label\' => Mage::helper(\'enterprise_customer\')->__(\'Customer Checkout Register\'),\'value\' => \'checkout_register\'
        ),array(
            \'label\' => Mage::helper(\'enterprise_customer\')->__(\'Customer Registration\'),\'value\' => \'customer_account_create\'
        ),array(
            \'label\' => Mage::helper(\'enterprise_customer\')->__(\'Customer Account Edit\'),\'value\' => \'customer_account_edit\'
        ),array(
            \'label\' => Mage::helper(\'enterprise_customer\')->__(\'Admin Checkout\'),\'value\' => \'adminhtml_checkout\'
        ),array(
            \'label\' => \'Wishlist Register\',\'value\' => \'clientcatalog_index_view\'
        ),);
}
这是我在布局xml文件中使用的块,该块定义了要使用的模板以及要附加到模板的操作。
            <block type=\"customer/form_register\" name=\"customer_form_register_wishlist\" template=\"wishlist/wishlist_register.phtml\">
            <action method=\"append\"><block>customer.form.register.fields.before</block><alias>form_fields_before</alias></action>
            <action method=\"append\"><block>customer_form_user_attributes</block></action>
            <action method=\"append\"><block>customer_form_address_user_attributes</block></action>
        </block>
    

解决方法

        如您在
app/design/frontend/base/default/template/customer/form/edit.phtml
中看到的那样,表单是“已编码的”,您需要编辑模板以添加所需的字段。