1

I am with a need to reorder 03 street fileds in the following order in shipping, billing, and customer address forms.

street[2] - first
street[1] - second
street[0] - third

I could reorder other fields, but could not find the proper way to reorder individual street fields.

Can someone please guide me to the proper implementation for that?

Thanks and Best Regards

Indunil

1 Answer 1

0

You can change the street input sort order using a plugin for Magento\Checkout\Block\Checkout\LayoutProcessor:

class Reorder
{
    public function afterProcess($subject, $jsLayout)
    {
        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
        ['children']['shippingAddress']['children']['shipping-address-fieldset']
        ['children']['street']['sortOrder'] = 200;

        return $jsLayout;
    }
}

Your Answer

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

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