Support

Home Forums Event Espresso Premium Easy Duplicating or Templates

Easy Duplicating or Templates

Posted: February 25, 2019 at 12:07 pm

Viewing 3 reply threads


SeaLight

February 25, 2019 at 12:07 pm

I currently have Event Espresso on a dog training website and they frequently have to create new events but need to have duplicated information in the events. The way it works right now is they have to click ‘edit’ on the event, then ‘Duplicate Event’ and modify the information (date, time, ticket name, etc.). I would REALLY like if there was a way to have the ‘Duplicate Event’ button in the event list so I can duplicate an event more easily without going into the current event since sometimes I forget to duplicate it first.

Bonus points if you can setup an event as a template and modify certain parameters which keeping other things the same (event category, questions, ticket price, ticket quantity, max number of tickets, etc.)


Tony

  • Support Staff

February 26, 2019 at 9:56 am

Hi there,

I would REALLY like if there was a way to have the ‘Duplicate Event’ button in the event list so I can duplicate an event more easily without going into the current event since sometimes I forget to duplicate it first.

Currently, the only place something like that could be added is in the ‘Actions’ column of the event list. We have a filter that allows you to add additional items to that section FHEE__EE_Admin_List_Table___action_string__action_items, the EE4 Printable tickets add-on has an example of using that filter which could be used as a base to build a duplicate event link for those actions.

Bonus points if you can setup an event as a template and modify certain parameters which keeping other things the same (event category, questions, ticket price, ticket quantity, max number of tickets, etc.)

Unless I’m misunderstanding, that happens anyway when you duplicate an event?

So you’d just create a template event with all of the settings you want enabled and then duplicate that template each time. The event categories, questions, tickets, etc should all be set on the duplicate as they were on the original.


SeaLight

February 26, 2019 at 10:04 am

Hey Tony thanks for your reply.

Currently, the only place something like that could be added is in the ‘Actions’ column of the event list. We have a filter that allows you to add additional items to that section FHEE__EE_Admin_List_Table___action_string__action_items, the EE4 Printable tickets add-on has an example of using that filter which could be used as a base to build a duplicate event link for those actions.

Where would I add that filter/code?

Unless I’m misunderstanding, that happens anyway when you duplicate an event?
So you’d just create a template event with all of the settings you want enabled and then duplicate that template each time. The event categories, questions, tickets, etc should all be set on the duplicate as they were on the original.

Yes, those items do duplicate, but a template could have presets. For instance, classes meet every week on a certain day for 4 weeks. If you change the first date and time, a template could change the following 3. Sometimes I forget to duplicate the event and have to undo/redo the details in it.


Tony

  • Support Staff

February 26, 2019 at 10:15 am

Where would I add that filter/code?

Add which code? The above is just the name of a filter you can use to hook in and add your own duplicate button to the content. You can add that code to a custom functions plugin and we have some documentation on doing so here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

However note that the above, on its own, does nothing.

Yes, those items do duplicate, but a template could have presets. For instance, classes meet every week on a certain day for 4 weeks. If you change the first date and time, a template could change the following 3. Sometimes I forget to duplicate the event and have to undo/redo the details in it.

I’m not sure how else to put this, but we can’t account for every setting you might forget to change and then the way in which you want it to work could be completely different to how someone else wants that template to work, so this is not something we can just throw together in a snippet.

We can help shorten the process a little, as we have done by copying over details when duplicating etc, but we can’t account for every possible use case when doing so. So we go with smart defaults and you (the admin) need to update those to suit your needs.

EE is littered with hooks, there are hooks you can use during the duplication request to set specific settings if you really wanted to, but I don’t know if you are comfortable with PHP an OOP to be able to do so?

For example, this action hook AHEE__Extend_Events_Admin_Page___duplicate_event__after allows you to hook in an alter any of the details on the ‘new’ event (the duplicate) and also has access to the ‘old’ event (the original) to pull details from that should you need to.

Viewing 3 reply threads

The support post ‘Easy Duplicating or Templates’ 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.

Event Espresso