Posted: July 28, 2020 at 11:41 am
|
Hi, what mysql table data is cloned when an event is duplicated. Im trying not to move away from ee4 but the recurring events is an issue and may have to duplicate over 700 events in the next few weeks. I was going to create a script to automate this as each day has effectively the same events and tickets each day Monday – Sunday. It is essentially booking football pitches by the hour. Is there a better work flow? w |
Hi Wayne, What you are trying to do isn’t as simple as it sounds (which is why we don’t have a simple workaround for rem right now). Multiple tables are used for each and every EE event. Some examples, (assuming the DB prefix is The datetimes for that event will be in The tickets for the event in The relationship between the datetimes and tickets in Trying to manually do this with your own query is not simple by any means, you would be better taking a look at how the _duplicate_event function (the function called when you click the button) duplicates the event using our models (which then handle all of the queries/relationships for you. |
|
|
Hi Tony, thanks for your speedy response – im not sure the least painful approach. is it best to do each day so 300+ events with hourly tickets or what I have been trying which is to have one event per day, i.e Monday with multiple event date times with each having multiple available tickets on the hour. This seems easier from the admin but from what I can see does not look the simplest from a ux point of view |
I can’t view those images currently although from what you’ve mentioned so far, I would likely use daily events as its easier for the main to “today’s” registrations that way. So for example you’d go to Event Espresso -> Events Load today’s registrations and export the report for a list of only today’s registrations, no selecting datetimes etc. |
|
|
Thanks |
Or, you could hook into the function I mentioned above (there’s a few hooks in that function to do the above) and do this via PHP when the button is clicked. Doing this after the duplicate button is clicked with JS is doable but personally, rather than hacking something in JS I’d just use PHP to set the dates on the fly. |
|
The support post ‘simplified mysql to copy event’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.