I would like to add a couple or three extra fields to an Event – Namely Country of Origin(for VAT purposes – not necessary country of event), Country VAT Rate, and Country VAT Number.
Ideally I would record these when entering the general ‘settings’ when creating the event.
Previously I had managed to change OOTB code to allow me to add this data when creating a registration, but of course was duplicating it for every registration within an event. I added DB fields to the event_registrations.forms table to persist these.
This worked fine, but as I said, I was duplicating info, so decided to attempt to put at general settings level when creating the event.
I noticed that as well as using the events.event table for general data , you store some settings information in the events.settings table using the ‘module’ and ‘name’ to identify the value for the appropriate event.
I have tried about 5 times now to mimic your code but always end up with an attribute missing error, or assertion errors, or something similar – in all cases I am trying to add to the ‘settings’ table using either a ‘new’ module name, e.g. ‘country’ or one of the existing ones (tried both core and contact). I am doing this by code surfing for say ‘additional_info’ (along with related forms etc) and then making similar changes for my field(s)
The closest I got was initial persistence, but have never been allowed to edit them (can see them but get the errors etc), and now cannot even persist again!.
Have you got any sort of crib sheet of steps I should be following for this, or are you going to say ‘DON’T DO IT THAT WAY’ – if so, what way should I do it???
My next attempt was to add additional columns to the event table itself to see if I could persist there, but all these changes need to be recorded of course for future release.
Please can you advise (hopefully not with a DON’T DO IT) on how best to achieve this?