Home › Forums › Ticket Products › Event Tickets Plus › Events Calendar using same email template a Woocommerce Sensei
- This topic has 11 replies, 3 voices, and was last updated 8 years, 2 months ago by Support Droid.
-
AuthorPosts
-
November 19, 2015 at 2:00 am #1027850ChrisParticipant
I’m using Woocommerce Sensei for online courses and Events Manager Pro + Wootickets for physical events – if a physical event is purchased the order confirmation email sent uses the Woocommerce Sensei email template even if a Sensei product isn’t present in the order.
Is it possible to override this
P.S. for the record Woocommerce passed the buck to Tribe!.
Many thanks
November 19, 2015 at 12:27 pm #1028212NicoMemberHey Chris,
Thanks for reaching out to us! I’ll try to help you getting this right…
Well, let me see if I get this right. When you install Sensei, and purchase tickets for an event instead of getting the tickets email in the ‘Events Calendar format’, you are getting it in the ‘Sensei format’. Strange thing because our plugin uses it’s own template to send ticket (located at ‘/plugins/the-events-calendar/src/views/tickets/email.php’) as far as I’am aware. You can check if there’s a ‘tribe-events’ folder in the theme containing a template override for the email.
Please check on that and let me know,
Best,
NicoNovember 19, 2015 at 1:12 pm #1028233ChrisParticipantIt’s not the ticket email – it’s the order confirmation email containing order details, payment details and the “course details will be send separately” message.
November 20, 2015 at 2:45 am #1028396November 20, 2015 at 11:57 am #1028737NicoMemberHey Chris,
Thanks for clarifying on this! I’m not able to see the attached screenshot (you can upload it to cloudup.com or other image sharing service and share the link here) but I think I get you. The email you are referring to, is the standard WooCommerce order email which Woo sends when a purchase is made. I guess ‘Sensei’ is overriding this email without checking if it’s a sensei purchase or just a regular purchase like in our case. I guess the solution might be to override he new order email in your own theme (https://docs.woothemes.com/document/template-structure/), with a copy of the Sensei template but with different text.
Please let me know if this makes sense to you,
Have a great weekend,
NicoNovember 25, 2015 at 3:16 am #1030518ChrisParticipantThanks – I’ve got Woocommerce currently working on this as they’ve now confirmed there’s a bug at their end.
Related to this I have a few more questions:
1) I notice that when a refunded order is processed the message “You’ll receive your tickets in another email.” Still appears underneath the order table. Can this be removed?
2) In your order confirmation emails when a product has been purchased you have the message “Your order is complete. Download your plugins at…” at the top of the order. Can you let me know how to add this to our emails (also Woocommerce)?
3) All refund emails say “Your order has been partially refunded” even when fully refunded – is there a way around this or is this a Woocommerce issue?
Many thanks
November 25, 2015 at 12:23 pm #1030926NicoMemberHey Chris,
Glad to hear this is being addressed by the Woo team 🙂
1) I notice that when a refunded order is processed the message “You’ll receive your tickets in another email.” Still appears underneath the order table. Can this be removed?
Not sure what you are referring to here. You mean a user purchases tickets, then you refund the order and in the refund email you see the “tickets” related text?
2) In your order confirmation emails when a product has been purchased you have the message “Your order is complete. Download your plugins at…” at the top of the order. Can you let me know how to add this to our emails (also Woocommerce)?
You can override Woo’s emails as shown here: https://docs.woothemes.com/document/template-structure/ – Have you tried it? Maybe you’ll need to do so in a child theme of Sensei? Not sure how that works for Woo/Sensei.
3) All refund emails say “Your order has been partially refunded” even when fully refunded – is there a way around this or is this a Woocommerce issue?
I’m mostly sure we are not modifying the refund email, so this is probably happening on the WooCommerce side. You can check so by disabling WooTickets and refunding the order. If you are not refunding all items in the order I guess this message makes sense!
Please let me know if you have any other follow-up questions on this,
Best,
NicoNovember 25, 2015 at 2:18 pm #1030958ChrisParticipantThanks Nico…
1) Yes! I would ideally like to remove this message as it would not longer be relevant.
2) OK – will take a look
3) OK! It seems to be a common Woocommerce problem.
November 30, 2015 at 7:34 am #1032609NicoMemberNice Chris!
1) Yes! I would ideally like to remove this message as it would not longer be relevant.
Diving into the code revealed the message is added to the order email which is the same for a complete order or a refunded one. To remove the message from all emails use the code below.
remove_action( 'woocommerce_email_after_order_table', array( 'Tribe__Events__Tickets__Woo__Main', 'add_tickets_msg_to_email' ) );
If you want to keep the message for complete orders but not refunded ones, let me know and we can hook a modified add_tickets_msg_to_email to address this!
Best,
NicoNovember 30, 2015 at 7:55 am #1032631ChrisParticipantHi – thanks for this.
Please can you look a the modified hook you mention – it really needs to keep the message for complete orders only so customers are not let guessing.
Many thanks
December 1, 2015 at 1:23 pm #1033443NicoMemberHey Chris,
Thanks for you patience on this! The complete code is the following:
if ( class_exists( 'Tribe__Events__Tickets__Woo__Main' ) ) {$woo_tickets = Tribe__Events__Tickets__Woo__Main::get_instance();
remove_action( 'woocommerce_email_after_order_table', array( $woo_tickets, 'add_tickets_msg_to_email' ) );
add_action( 'woocommerce_email_after_order_table','custom_add_tickets_msg_to_email', 10, 2 );
function custom_add_tickets_msg_to_email( $order ) {
$order_items = $order->get_items();
// Bail if the order is empty or refunded
if ( empty( $order_items) || $order->get_total_refunded() != NULL ) {
return;
}$has_tickets = false;
// Iterate over each product
foreach ( (array) $order_items as $item ) {$product_id = isset( $item['product_id'] ) ? $item['product_id'] : $item['id'];
// Get the event this tickets is for
$event_id = get_post_meta( $product_id, '_tribe_wooticket_for_event', true );if ( ! empty( $event_id ) ) {
$has_tickets = true;
break;
}
}if ( ! $has_tickets ) {
return;
}echo '<br/>' . apply_filters( 'wootickets_email_message', __( "You'll receive your tickets in another email.", 'tribe-wootickets' ) );
}
}
Basically it detects if there’s a refunded amount other tan NULL, in which case it doesn’t display the message.
Please give it a try and let me know if it works as expected,
Best,
NicoFebruary 18, 2016 at 8:32 am #1075871Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Events Calendar using same email template a Woocommerce Sensei’ is closed to new replies.