1

By default customer address fields are set at website level rather than store level. I would like to add the customer tax/VAT field to show on one store view ("codice fiscale" for Italy) but not have that field show with other store views.

I have tried copying the core 'customer.xml' to somewhere local, amending it to show tax/vat at store level. That shows the needed changes in admin system config but it does not work in the front end. I now have the tax/VAT box showing everywhere on the front end.

Additionally I would like to add a regex validation for the 'codice fiscale' using the latest 1.9 theme. I think I can add the custom regex and get it to work, however if anyone has any advice on setting customer address options at store level that would be most helpful.

1 Answer 1

1

You will have to code this by yourself.

Open the address phtml you are using and add an if statement with the storeid you want to use to show the field only in the store you want. You can mark the input as required in the frontend and make it mandatory only when the field is shown.

This approach should not affect the rest of the storeviews.

Your Answer

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

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