Hi,
We need to add Tax/VAT number to checkout form when the customer is not logged in. If the customer creates an account before placing the order, he enters the tax/vat number and all his next orders save that info.
But when the customer places an order without registering, the shop is not asking him for the TAX/VAT number, and we need it in this case too.
We've been over this question for days and we're really going crazy.
Any elp will be appreciated.
Hi @alsernet,
Maybe you've missed the right forum? (this one is intended to be in spanish).
Which version of Magento are you using?
Hola,
Perdón, no me di cuenta de que era el foro en español.
La versión es la 2.1.2. Como decía antes, cuando el pedido lo hace un usuario registrado se guarda el NIF porque es un dato que se pide en el registro de usuario, pero cuando el pedido lo hace un usuario sin registrar es un dato que no se pide.
He invertido muchas horas en intentarlo pero no soy capaz, a pesar de que la columna 'customer_taxvat' existe tanto en la tabla quote como sales_order.
Toda ayuda es bienvenida.
Gracias
1 -
SELECT * FROM customer_form_attribute where form_code = 'customer_account_create' ;
2 -
SELECT attribute_id, attribute_code FROM customer_form_attribute join customer_eav_attribute using(attribute_id) join eav_attribute using(attribute_id) where form_code = 'customer_account_create' and attribute_code = 'taxvat';
2.1 -
SELECT * FROM customer_form_attribute where form_code = 'customer_account_create' ;
3 -
SELECT * FROM customer_form_attribute where form_code = 'checkout_register' ;
4 -
INSERT INTO customer_form_attribute (form_code, attribute_id) VALUES ('checkout_register', <attribute_id>);