Posted: May 8, 2015 at 12:53 pm
|
Hi, we are trying to add additionnal fields to datetimes in admin. We tried some filters like this one: But this is not working. Even if we return nothing, it doesnt create any bug. Can you please help us ? Thank you. |
Hi Samuel, could you share what you are trying to accomplish with these changes? Thanks — |
|
|
We are currently customizing Event Espresso for one of our customer. Is it the better way to do this or do you have better solution ? If yes, how can we insert these additonnal fields without modifying core files. We have thinked using jQuery to append these fields, if these is no other way to do it. Let us know what you can do to help us. |
|
Hi, I don’t think there are any hooks or filters to insert fields into the admin datetime fields. Looking at the code, those fields are generated by a meta box template (/wp-content/plugins/event-espresso-core-reg/caffeinated/admin/new/pricing/templates/event_tickets_metabox_main.template.php). However, it looks like that template is called from /wp-content/plugins/event-espresso-core-reg/admin_pages/events/Events_Admin_Page.core.php (line 1326) where there is a filter for the template. As such it may be possible to copy the template, modify it, and use that filter to show the newly modified template.
I haven’t tested this, so it may be that this also affects the front end datetimes as well, so you may want to add additional checks. As always, work on a development server and back up before modifying files. |
|
Thank you for your help, but we already found and try to use this filter like we mentionned in our first question here. The filter doesn’t seem to work is it possible ? We already used before a tons a action/filter and we have no problem to make it work but this filter doesnt seem to apply correctly. Do you have any suggestions for us ? |
Hi Samuel, The Event Espresso Premium (Caffinated) version does not allow you to filter the Ticket Editor template. That filter is for the Decaff version which doesn’t not have as much going on within the editor. There is a lot of JavaScript running on the ticket selector and modifying the template could easily break that. We do have hooks for adding functionality to the template but it depends on exactly what you are trying to achieve. So can you provide some information on what you need to add and where please? I’ll get some feedback from our developers to see if there are hooks available for providing that functionality (we can also request others) |
|
The support post ‘What is the best way to add fields to datetimes or ticket ?=’ 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.