1

In Magento 2.1.2

How to remove billing address lastname field and shipping address lastname field ?

I update to eav_attribute table. UPDATE eav_attribute SET is_required = 0 WHERE attribute_code = 'lastname' and entity_type_id = 1; and I removed vendor/magento/module-customer/view/frontend/templates/widget/name.phtml

The lastname is valid, but the billing address and the delivery address are invalid.

Does anyone know this ?

2 Answers 2

0

If you are using the Magento Onepage Checkout, I believe this is going to fall under a js file.

Checkout -> view -> frontend -> web -> js (folder)

You can start with checkout-data.js but you will also have to modify corresponding files (files that are passed the billing address last name and shipping address last name fields) if you want it completely removed from the app (meaning not throwing a "This is a required field." error)

It may be easier to try and find an extension that can do this for you.

0
  1. Find the relevant attribute id from eav_attribute
  2. Delete the record from customer_form_attribute. delete from customer_form_attribute where attribute_id=25 and form_code='customer_register_address';
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.