Skip to main content
edited tags; edited title
Link
7ochem
  • 7.6k
  • 16
  • 54
  • 82

remove Remove last name in billing address?

Source Link
Magento 2
  • 3.8k
  • 7
  • 58
  • 109

remove last name in billing address?

I am using Magento1.9 I followed below mention step after that i got error message

UPDATE eav_attribute SET is_required = 0 WHERE attribute_code = 'lastname' 

/app/code/local/Mage/customer/Model/Address/Abstract.php:

 /* if (!Zend_Validate::is($this->getLastname(), 'NotEmpty')) { $this->addError(Mage::helper('customer')->__('Please enter the last name.')); } */ 

/app/code/local/Mage/customer/Model/Customer.php

/* if (!Zend_Validate::is( trim($this->getLastname()) , 'NotEmpty')) { $errors[] = Mage::helper('customer')->__('The last name cannot be empty.'); } */ 

/app/code/local/Mage/customer/etc/config.xml

<lastname> <billing>1</billing> <shipping>1</shipping> **<required>0</required>** // change from 1 to 0 <mapped>1</mapped> </lastname> 

enter image description here