1

I am trying to remove street and city field from checkout on Magento 2.3.5-p1 but the validation is throwing me an error for required city and street. I have tried to add a value in the DB eav_attribute for city and street but nothing. I have added lines in billing and shipping at vendor/magento/module-checkout/... False for city and street as mentioned in other questions here on stack but nothing... Did anyone has a working solution?

0

This will only set the value as not required on the back-end, but still the validation process will go thru and will receive that street and city is required so the customer won't be able to place an order.

You have to overwrite checkout_index_index.xml in /magentoroot/vendor/magento/module-checkout/view/frontend/layout

After that you need to create a custom module that will set a value to city and street so it can pass the validation process. The values are stored in the Database at table eav_attribute, there you have to set the default value of city and street so the module you created will get the value from there.

At the end you can just hide those fields and the customer would not need to fill them. Deleting them is not recommended because these fields are used to create orders, invoices and many other stuffs.

0

SELECT * FROM eav_attribute WHERE attribute_code LIKE 'city' ORDER BY attribute_id DESC

And Check and change value is_requred is 1 to 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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