Magento has a feature to define between 1 and 4 fields, how much we will want to use in the street field. I've activated 4 lines and would like to add labels line by line. I did this on the user registration and address in my account as you can see in the image below:
I do it just editing phtml and layout (XML) files. And I extend \Magento\Customer\Model\ResourceModel\AddressRepository\AddressRepository
to turn required lines 2 and 3.
How can I add labels and turn lines 2 and 3 required on checkout?
Best Answer
I solved rewriting street on
di.xml
:And my
LayoutProcessorPlugin.php
: