Vivianne

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 34 total)
  • Author
    Posts
  • in reply to: Disable Ticket Emails #1129163
    Vivianne
    Participant

    Hi Brian

    I posted my complete coding on June 11th.
    Here again:

    add_action( 'init', 'wootickets_stop_sending_email' );
     
    function wootickets_stop_sending_email() {
        $chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
        $chosen_shipping = $chosen_methods[0]; 
     
        if ( (class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' )) AND ($chosen_shipping == 'international_delivery') ) {
            $woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();
            remove_filter( 'woocommerce_email_classes', array( $woo, 'add_email_class_to_woocommerce' ) );
            add_action( 'woocommerce_email_after_order_table', array( $woo, 'add_tickets_msg_to_email' ) );
        }
    }
    

    If I delete this part, which I need to define which emails shouldn´t be sent, I get the error:

    $chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
    $chosen_shipping = $chosen_methods[0];

    Do you have the whole picture now?
    You pointed me in the direction with these two code snippets (your first answer in this thread).
    Any idea why I get an error?

    in reply to: Disable Ticket Emails #1128363
    Vivianne
    Participant

    I get an Error 500 – Server Error.
    The debug file doesn´t say anything about my function.

    If I delete this part from my function, I don´t get the backend error.

    $chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
    $chosen_shipping = $chosen_methods[0]; 

    But without it, I cannot define, which shipping method I mean.

    Any idea?

    in reply to: Disable Ticket Emails #1125538
    Vivianne
    Participant

    Thanks for your code snippets.
    I added following code to my functions.php:

    add_action( 'init', 'wootickets_stop_sending_email' );
    
    function wootickets_stop_sending_email() {
    	$chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
    	$chosen_shipping = $chosen_methods[0]; 
    
    	if ( (class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' )) AND ($chosen_shipping == 'international_delivery') ) {
    		$woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();
    		remove_filter( 'woocommerce_email_classes', array( $woo, 'add_email_class_to_woocommerce' ) );
    		add_action( 'woocommerce_email_after_order_table', array( $woo, 'add_tickets_msg_to_email' ) );
    	}
    }

    It works in the frontend, but I can´t load my backend anymore. It only shows a white page.
    Do you see an error I can´t find?

    in reply to: Global Stock #1123447
    Vivianne
    Participant

    This reply is private.

    in reply to: Tickets Email – Change Subject #1108123
    Vivianne
    Participant

    Thanks a lot!
    Now it works perfectly! 🙂

    in reply to: Event details in cart, checkout and emails sent #1104204
    Vivianne
    Participant

    It works now! You are amazing!
    Thanks a lot!

    You are right with your sidenote:
    I removed it in my try & error status to get it working. 😉
    It´s back there now.

    in reply to: Event details in cart, checkout and emails sent #1104192
    Vivianne
    Participant

    I was able to add all the details to my cart, checkout and overview-page.
    In the emails this method doesn´t work. It adds the page-title instead of the event-title and the actual date/time instead of date/time of the event.

    Could you help me once more?
    I added this code to the file email-order-items.php in the woocommerce folder.

    $event = tribe_events_get_ticket_event( $cart_item['product_id'] );
    
    echo '<br><span class="name">'. tribe_get_events_title( $event->ID ) . '</span>';
    echo '<br><span class="date">'. tribe_get_start_date( $event->ID ) . '</span>';
    echo '<br><span class="venue">'.tribe_get_venue( $event->ID ).', <span>'. tribe_get_city( $event->ID ). '</span></span>';
    in reply to: Event details in cart, checkout and emails sent #1104137
    Vivianne
    Participant

    I tried your code and I was able to add the title. (After changing tribe_events_get_event_ticket to tribe_events_get_ticket_event)
    Trying to go for the rest now… 😉

    • This reply was modified 10 years ago by Vivianne.
    in reply to: Event List Reload Problem #1102951
    Vivianne
    Participant

    I found a solution!
    In my custom.js I added following code:

    $( tribe_ev.events ).on('tribe_ev_ajaxSuccess', function() {
      customJS();
    });

    And I added my code which needs to be loaded after the Ajax Call in the customJS-var.

    in reply to: Event details in cart, checkout and emails sent #1102686
    Vivianne
    Participant

    I tried to understand all you have written, but I cannot figure out, how this special code would look like.
    Could you make an example please?
    We need to go live next week and I am stuck here with this request of the client.

    in reply to: Event List Reload Problem #1102675
    Vivianne
    Participant

    I understand that you cannot support further more in this case.
    But can you tell me where this ajax call is written which reloads the event list?

    in reply to: Change price format #1102545
    Vivianne
    Participant

    This reply is private.

    in reply to: Event List Reload Problem #1102448
    Vivianne
    Participant

    I found an interesting topic here:
    http://stackoverflow.com/questions/16062899/jquery-doesnt-work-after-content-is-loaded-via-ajax

    If I want to try this solution I need to have the possibility to access the ajax call for the filtering of the event list. Where can I find that?

    Do you think this could fix the problem?

    in reply to: Event List Reload Problem #1102441
    Vivianne
    Participant

    This reply is private.

    in reply to: Event details in cart, checkout and emails sent #1102426
    Vivianne
    Participant

    I have to try this.
    When we decided for the plugins we thought something like this is included as a standard.
    I guess there are a lot of people who need this exact details in the emails etc.

    I will get back to you if I am stuck.

    Thanks a lot for the first input.

Viewing 15 posts - 1 through 15 (of 34 total)