Home › Forums › Ticket Products › Event Tickets Plus › Customize ticket email – Meta and QR table
- This topic has 7 replies, 2 voices, and was last updated 8 years, 7 months ago by
David.
-
AuthorPosts
-
August 11, 2017 at 12:11 am #1333931
David
ParticipantHi!
I want to change some html and CSS in the ticket email for user. I already have this in my theme folder
/theme_folder/tribe-events/tickets/emails.php
Here i could change some part of the email, but can figure out how to modified the Meta information and QR.
from email.php call to “tribe_tickets_ticket_email_ticket_bottom” and lookig for i found in plugin ticket plus folder: render.php and QR.php
in this files are the <table> i want to custimize but i dont know how.Any help?
August 11, 2017 at 9:09 am #1334100Victor
MemberHola David!
Thanks for getting in touch! Let me try to help you with that.
Are you trying to make use of the ‘tribe_tickets_ticket_email_ticket_bottom’ to add some data? Could you please let me know exactly what you’re trying to accomplish so I can help you out?
Please note that we can’t give support for custom development questions like that as we state here.
That said, we always like helping out and at least point you in the right direction as best we can.
Let me know it.
I noticed you’re from Spain, so feel free to reach out to me in Spanish if that’s more comfortable for you, as it’s my native language too.
Best,
VictorAugust 13, 2017 at 9:28 am #1334687David
ParticipantHola Víctor.
Te cuento, realmente no quiero añadir nuevos meta data sino modificar el CSS de las tablas.
Como te comenté, he podido editar email.php añadiendo nuevo CSS y modificando el html de las tablas,que hay en este archivo.
Pero al final de este archivo hace una llamada a tribe_tickets_ticket_email_ticket_bottom
Que entiendo que pinta dos últimas tablas:
-Meta data de assistance
-QR
Cómo estás dos tablas no se pintan realmente en email.php,no puedo editar su CSS ni HTML. Alguna idea de cómo puedo customizar estás últimas dos tablas?
Cómo te comenté, buscando la función() he encontrado render.php y QR.php que pintan el html de estas tablas, pero no se como pasar estos archivos a mi Theme y poder editarlos.Un abrazo y gracias Víctor.
August 14, 2017 at 6:23 am #1334909Victor
MemberHola David! 🙂
Gracias por aclarar esto.
Si solo quieres modificar el CSS, no es necesario modificar lo que imprimen esas funciones, sino que puedes agregar el CSS pegándolo en style.css de tu tema, o utilizando el WordPress customizer yendo a Appearance > Customizer > Additional CSS.
Si en cambio, quieres modificar su HTML, entonces debes saber que la meta data y el código QR se agregan a email.php a través del action “tribe_tickets_ticket_email_ticket_bottom”. Para poder modificar el html de estos, deberías recrear las funciones que encuentras en QR.php y Render.php y agregar este nuevo código en functions.php o creando un plugin propio para esto. Lo cual es de mayor complejidad.
Espero que esto ayude! Si tienes otra pregunta no dudes en hacerla.
Saludos,
VictorAugust 15, 2017 at 11:47 pm #1335898David
ParticipantHola Victor, muchas gracias por tu respuesta. He tratado de añadir las funciones de Render y QR a email.php pero la verdad que supera un poco mis conocimientos de desarrollador.
Lo cierto es que llegado a este punto, con solo modificar un poco el CSS me valdría. No estoy seguro de lo que me comentas de añadir el css a mi Style.css, puesto que esto es un mail y no veo como pillaría los estilos del Theme. Habría que meterlos en linea en la tabla no?
Tengo los estilos metidos tanto en mi style.css como en el archivo email.php (que ya trae algunos estilos para mediaquery incluidos) pero es imposible que los pille.
Tanto en QR como en Render, los estilos por defecto están escritos en linea en el html de la tabla.Te paso captura de pantalla del ticket, como ves he podido reescribir el css de la parte html que pinta en email.php, metiendo nuevos estilos en linea, pero del final no puesto que no tengo acceso a ese hmtl.
No se, debería haber una manera más sencilla al menos de reescribir el CSS de los tickets. No se si se te ocurre alguna Victor.
Un saludoAugust 16, 2017 at 6:44 am #1335970Victor
MemberHola David!
Perdón por la confusión. Es verdad, los estilos del mail deben estar dentro del mail para cargarse.
Puedes utilizar el action hook tribe_tickets_ticket_email_styles para agregar estilos al template de email.php
Tomando el siguiente código que puedes pegar en el archivo functions.php puedes adaptarlo a tus necesidades para agregar los estilos que quieras:
add_action( 'tribe_tickets_ticket_email_styles', 'custom_css_ticket_email_meta', 9 );
function custom_css_ticket_email_meta(){
echo '.ticket-content {background-color: #b9e2f7; }';
}También puedes hacer un template override y agregar los estilos directo en el template.
Espero que esto ayude! 🙂
Saludos!
VictorSeptember 7, 2017 at 9:36 am #1346028Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Customize ticket email – Meta and QR table’ is closed to new replies.
