the method in customermanager:
public static bool CanUseAddressAsShippingAddress(Address address)
The lines will prevent shipping address being inserted if address 2 is not required (as it's not in many non-us countries):
if (address.Address2 == null)
return false;
if (String.IsNullOrEmpty(address.Address2.Trim()))
return false;
Simply replace with this:
if (address.Address2 == null && CustomerManager.FormFieldStreetAddress2Required)
return false;
if (String.IsNullOrEmpty(address.Address2.Trim()) && CustomerManager.FormFieldStreetAddress2Required)
return false;
The same goes for:
public static bool CanUseAddressAsBillingAddress(Address address)