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

Magento 自定义表单上的自定义客户属性,magento,Magento,我有4个自定义属性已添加到客户帐户创建/编辑表单中。我还有一个模板,基本上是现有登记表的精确副本。唯一的区别是,我在另一个模块中使用它,post操作是通过ajax完成的 我遇到的问题是自定义属性不显示在自定义模板上 <block type="customer/form_register" name="customer_form_register_wishlist" template="wishlist/wishlist_register.phtml">

我有4个自定义属性已添加到客户帐户创建/编辑表单中。我还有一个模板,基本上是现有登记表的精确副本。唯一的区别是,我在另一个模块中使用它,post操作是通过ajax完成的

我遇到的问题是自定义属性不显示在自定义模板上

            <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>
到目前为止,我的研究表明,我需要将表单的值添加到属性中。这是通过重写Enterprise\u Customer\u Helper\u数据类完成的。但是,这仍然不起作用,自定义属性不会显示在我创建的自定义模板上

这是我在重写中重写的更新方法。要在中使用的新表单是愿望列表注册表。该值是布局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中所看到的那样,表单是经过harcoded的,您需要编辑模板以添加所需的字段。

情况并非如此,因为这些是我正在使用的自定义eav属性。不是标准的硬编码属性。您使用的是自定义eav属性,就像所有客户属性一样,那么有什么区别呢?您是否查看了自定义注册表字段加载项?它节省了大量时间,并支持多站点。