1

There is an answer here : How to move VAT field in checkout

This does not explain how to move it also for the billing address. I imagine it's possible to combine these moves in the same file but I don't know how to do it.

1 Answer 1

0

So you have to add the custom module to move the vat from first with the link that you attached. And in the afterProcess() function, add the codes with this.

$whereBilling = $this->_helper->getConfig('checkout/options/display_billing_address_on');

        if ($whereBilling == 0) {
            //$paymentsList = [ "checkmo-form", "cashondeliver-form", "purchaseorder-form", ];
            $paymentsList = $this->getActivePaymentMethods();
            
            foreach ($paymentsList as $payment_code => $model) {
$jsLayout['components']['checkout']['children']['steps']['billing-step']['children']
            ['payment']['children']['payments-list']['children'][$paymment_name]['children']['street']['vat_id']['sortOrder'] = 20;
}
} else {
$jsLayout['components']['checkout']['children']['steps']['billing-step']['children']
            ['payment']['children']['afterMethods']['children']['billing-address-form']['children']['form-fields']['children']['vat_id']['sortOrder'] = 20;
}

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.