We setup 2 website/store. When we tried to create customer from a store (i.e. not main store). By using customer/form_register
type form submission. customer created successfully but taxvat
field not saving with customer information. All other required customer attributes firstname
, lastname
, email
saving correctly but only taxvat
attribute not saving.
Code for Load layout with customer/form_register
block type :
<reference name = "content">
<block type = "customer/form_register" name = "customer_form_register" template = "seller/seller.phtml">
<action method = "setShowAddressFields"><value>true</value></action>
<block type = "page/html_wrapper" name = "customer.form.register.fields.before" as = "form_fields_before" translate = "label">
<label>Form Fields Before</label>
</block>
</block>
</reference>
Template File :
<form name="test-form1" id="my-custom-form1" action="<?php echo $this->getPostActionUrl(); ?>" method="post">
<input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl(); ?>" />
<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl(); ?>" />
<div>
<div>
<label>Email <span class="required">*</span></label>
<input type="text" name="email"/>
</div>
</div>
<div>
<div>
<label>First Name <span class="required">*</span></label>
<input type="text" name="firstname"/>
</div>
</div>
<div>
<div>
<label>Middle Name <span class="required">*</span></label>
<input type="text" name="middlename"/>
</div>
</div>
<div>
<div>
<label>Last Name <span class="required">*</span></label>
<input type="text" name="lastname"/>
</div>
</div>
<div>
<div>
<label>Tax/Vat Number <span class="required">*</span></label>
<input type="text" name="taxvat"/>
</div>
</div>
<div>
<div>
<input type="submit" name="sub" value="Submit">
</div>
</div>
</form>
This problem also exist for middlename
, prefix
, suffix
attribute.
All these attributes 'taxvat', 'middlename', 'prefix', 'suffix' are exist in default magento setup same like 'firstname', 'lastname', 'email' exist. the only difference is they are not required.
Can anyone please tell me why this is happened and how to resolve this problem?
taxvat
attribute, just clear your cache and var/lock folder. Re-index your magento and try again.