burt wrote: ↑Wed Aug 26, 2026 8:14 am
A Customer Data module on create_account.php that stores the customers Tax ID in the customers table?
Then on each order, store this in the Order Table and show where needed? <--- you need to do this to make that Tax ID immutable (unable to be changed by the customer after Order is made).
That might work?
We have Spain based users, one of them must have done something like this?
Hopefully one of them might see this and advise you.
Yes, that is the way it was done for osc234bs and it is nearly finished as a Custemer Data module.
Thank you
ecartz wrote: ↑Wed Aug 26, 2026 1:36 pm
It would probably be better to show the tax ID by hook directly rather than in the address. Because it sounds like your problem is that you're trying to show different address formats to hack the tax ID into them. That's a clever idea, but I think it will keep having consequences that you don't want. Meanwhile, adding fields to the invoice is something that others need. So it would be easier to get help with that if it isn't working quite how you need it.
ok, thank you, I agree with that modifying the address_format_id can have other consequences not seen at the moment, I will go addind the fields to the pages, not big problem. Tahnk you for the advise.
Yes, yours is quite complete and for any EU country, my module will only work for Spain and only to collect the Tax Id at the account creation moment and to show the Id in the invoices and other related documents.
Anyway, thank you very much
burt wrote: ↑Wed Aug 26, 2026 3:05 pm
One final point ... in `modern` Phoenix you should be able to do all of this without any core code changes. A module, maybe a couple of Hooks. Done.
Well..., I would like to be able to do that but, at this time in my learning process, I need a module, a hook and overriding the pages where the id appears, perhaps in the future I can simplifly to a module and a hook, I would like to arrive at that point.
Thank you