I'm from Brazil, and here we use the "taxvat" customer field to store a number called "CPF". I managed to make the field appear on checkout by adding it to an layoutProcessor, like this:
$shippingFields['taxvat'] = [
'component' => 'Magento_Ui/js/form/element/abstract',
'label' => __('CPF'),
'config' => [
'customScope' => 'shippingAddress',
'template' => 'ui/form/field',
'elementTmpl' => 'ui/form/element/input',
],
'placeholder' => 'CPF *',
'validation' => [
'required-entry' => 1
],
'provider' => 'checkoutProvider',
'source' => 'customer.taxvat',
'dataScope' => 'customer.taxvat',
'sortOrder' => 1,
];
But, i don't know why, this field it's not saving on database. It only works if i save this field on customer form, not on checkout form.
Anyone know what i'm missing?
i want to do that to enable guest checkout (but i need this field)
thanks!