Answer the question
In order to leave comments, you need to log in
How to split the address field into street, house, building, apartment (office number)?
The task is to split the address field into components (street, house, building, apartment (office number)) in the standard checkout form (placement order), so that each field is a separate input. Before that, I had no business with Magento, from the word "absolutely".
Please point in the right direction on what and, most importantly, how to register and redefine a new component, or you can change the current one, thanks in advance!
Answer the question
In order to leave comments, you need to log in
You need to create a layout processor. This class will contain a large array with all the inputs and their attributes. You can put a breakpoint in xdebug in the layout processor class you create, on the js layout variable, and overwrite the values of the array keys accordingly. For example here
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['company']
['config']['elementTmpl'] = 'Vendor_Checkout/inputs/company';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question