I'm looking for the validation of billing.phtml for onepage so that I can remove a field from being 'required'
I've tried the Abstract.php file and a copy of it I made but no change as of yet
The client side validation is done via javascript in the template. Enable the template path hints to see the template used.
The server side validation is done eventually in Mage_Customer_Model_Address_Abstract::validate
following this stack trace:
Mage_Checkout_OnepageController::saveBillingAction
Mage_Checkout_Model_Type_Onepage::saveBilling
Mage_Customer_Model_Address_Abstract::validate
That's just part of the validation.
An other part is done in Mage_Checkout_Model_Type_Onepage::_validateCustomerData
. This validates address attributes based on the validation rules set in the table customer_eav_attribute
.
You may need to change the validate_rules
field for the attribute in question.
Enable Template Path Hints and proceed to checkout. With that you will be able to identify the phtml in use and there you can change the input to be required or not.
System - Configuration - [Select Store View or Website] - Developer - Template Path Hints and save.