Different email notifications for Tickets and Product orders

Home Forums Ticket Products Event Tickets Plus Different email notifications for Tickets and Product orders

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1362282
    Christian Thomson
    Participant

    Hello there,

    I was wondering how I can customize the content for customer Order and Processing notifications depending on what product/ticket they purchase.

    I was using WooTickets only until now, and I had customized the WooCommerce email notifications via functions.php and WooCommerce’s customer-completed-order.php and customer-processing-order.php files.

    However, now I’m expanding the use of WooCommerce for this website, and we’re selling products as well. So I need to customize the message sent to customers in case they purchase a ticket, a product, or both.

    How could I do that? Is there a custom function, or a plugin that could help me with that? I purchased the plugin https://woocommerce.com/products/advanced-notifications/ but it doesn’t do what I am looking for (customize customer notifications based on tickets and/or products types).

    Please help 🙂
    Thanks!
    Cintia

    #1362616
    Victor
    Keymaster

    Hi Cintia!

    Thanks for reaching out to us! Let me try to help you with this topic.

    I think you can achieve that by customizing the WooCommerce email template files, as you already did. It really depends on what specific message you want to customize for those emails, but it will require some custom coding to achieve what you are looking for.

    We are limited in how much support we can give for custom development questions like this, but we always like helping out and at least guide the users into the right direction. So, if you let me know what specific messages you want to customize, I’d be happy to guide you as much possible.

    Let me know about it 🙂

    Best,
    Victor

    #1362995
    Christian Thomson
    Participant

    Hi Victor,

    Thanks for the reply!

    What I’m looking for, is to customize the messages depending on the mix of
    orders made by the customer. Eg:

    1) Event ticket + WC product
    2) Event ticket only
    3) WC Product only

    There are these 3 possibilities, but I want to include messages based on
    those 3 types of purchases. Eg:

    1) “Thanks for singing up for the course X. Note that you need to bring
    your own paper and pen.

    Here are the products you ordered.
    {table with products}
    If you chose to have it shipped, please note we’ll ship after payment is
    confirmed”.

    2) “Thanks for singing up for the course X. Note that you need to bring
    your own paper and pen.”

    3) “Here are the products you ordered.
    {table with products}
    If you chose to have it shipped, please note we’ll ship after payment is
    confirmed”

    I guess I need conditionals based on the type of product? The tickets are
    also products under WooCommerce Products, so how to create conditionals
    based on that?

    Thanks!!!!

    Cintia

    *Cintia Stela*
    *Graphic and Web Designer*
    *Marwick Internet Marketing*

    *The Trusted Search Marketing Agency – Premier Google Partner Agency*
    *Web: MarwickMarketing.com*
    *Call: 1-888-564-9340 *

    * *

    #1363613
    Victor
    Keymaster

    Hi Cintia!

    Thanks for coming back.

    I have just taken a look at how you could achieve that and one approach would be to use one of the available hooks provided in the WooCommerce email templates. For example, you could use the ‘woocommerce_email_order_details’ action hook to add the necessary message and make use of the WC_Order $order object passed as argument to make the necessary conditionals.

    I have come up with a code snippet that you can further customize to suit your specific needs. You should place the following code into your theme’s functions.php file:

    https://gist.github.com/vicskf/d588dd6d3c0f117ede547995be249ca7

    We also have an extension to Add Event and Attendee Information to WooCommerce Order Details > https://theeventscalendar.com/extensions/add-event-and-attendee-information-to-woocommerce-order-details/ that you might find useful.

    I hope that helps! Please let me know if it works for you.

    Best,
    Victor

    #1363777
    Christian Thomson
    Participant

    Hi Victor,
    Thank you so much for your reply, I will give this a try as soon as I’m able to solve another issue I’m having with my Store, with regards to another support thread I opened:
    https://theeventscalendar.com/support/forums/topic/book-now-button-leads-to-page-not-found-wc_cartget_cart_url-deprecated/

    I figured out a short-term solution, by replacing action="<?php echo esc_url( $woocommerce->cart->get_cart_url() ) ?>"
    with action="https://valleyfirstaidtraining.ca/cart/" And now I no longer get the 404 errors I was getting, but I’d still like to find out how to fix the deprecated code correctly.

    I’ll be in touch soon. Thanks!

    #1364165
    Victor
    Keymaster

    Hi Cintia!

    Sure thing! Thanks for flagging that.

    As they are different issues, please refer to that other topic for updates on it. I’ll try to chime in to that other thread today. If I’m not able to, rest assured other team member will 🙂

    Cheers,
    Victor

    #1364422
    Christian Thomson
    Participant

    Hi Victor,

    The code snippet you provided worked great. I ended up moving it to the Customer order email templates instead of functions.php, so I could customize the message depending on the type of email.

    Thank you very much!

    Cintia

    #1364606
    Victor
    Keymaster

    Hey Cintia!

    I’m glad it worked out fine for you! Thanks for following up to let me know about it.

    I’ll go ahead and close this thread, but don’t hesitate to open a new topic if anything comes up and we’d be happy to help 🙂

    Cheers,
    Victor

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Different email notifications for Tickets and Product orders’ is closed to new replies.