I need to disable validation for few customer address fields in customer/account/create/ (but only on this page).
Seems like I've messed up with names and can't find out how to fix my code. Folder structure:
Mycompany |__Mymodule |__controllers |__Customer |__AccountController.php etc |__config.xml Model |__Customer |__Address.php |__Customer.php config.xml
... <global> <rewrite> <mycompany_mymodule_customer_account_create> <from><![CDATA[#^/customer/account/create/$#]]></from> <to>/mymodule/customer_account/create</to> </mycompany_mymodule_customer_account_create> <excellence_address_customer_account_createPost> <from><![CDATA[#^/customer/account/createPost/$#]]></from> <to>/mymodule/customer_account/createPost</to> </mycompany_mymodule_customer_account_createPost> </rewrite> <models> <customer> <rewrite> <customer>Mycompany_Mymodule_Model_Customer_Customer</customer> <address>Mycompany_Mymodule_Model_Customer_Address</address> </rewrite> </customer> ... etc The validate() function will be overridden in Address.php
public function validate() { // my validation } By filling form under customer/account/create/, even if I've removed 'required' class in form and removed in customer_register_address customer_form_attribute for every attribute_id I don't need @ registration page (e.g. street, city etc.), I still got validation warning message:
Please enter the street. Please enter the city. etc