I have 4 custom attributes that have been added to the customer account creation/edit form. I also have a template that is basically an exact duplicate of the existing register form. Only difference is that I am using it in another module and the post action is done via ajax.
The issue that I am having is that the custom attributes do not display on the custom template.
So far my research has shown me that I need to add the value for Forms To Use In to the attribute. Which I have done by rewriting the Enterprise_Customer_Helper_Data class. However, this still does not work, the custom attributes do not display on the custom template I have created.
This is the updated method that I overrode in my rewrite. The new Form To Use In is Wishlist Register. And the value is the layout handle in my layout xml file.
Any help with this is greatly appreciated.
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'
),
);
}
This is the block that I am using with in my layout xml file that defines what template to use and what actions to append to the template.
<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"&g开发者_运维技巧t;<block>customer_form_address_user_attributes</block></action>
</block>
As you can see in app/design/frontend/base/default/template/customer/form/edit.phtml
, the forms are "harcoded", you need to edit your template to add the fields you want.
精彩评论