Pete

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • in reply to: Attendees by Ticket display #1434843
    Pete
    Participant

    I have disabled all plugins with the exception of Tribe Event Cal, Event Ticket, Event Ticket Plus, etc. and still have the same issue. I see that there is a new post reporting this same issue this morning. https://theeventscalendar.com/support/forums/topic/users-cant-edit-additional-attendee-information/

    Thanks,

    Pete
    Participant

    Just a quick note to let you know that I have resolved my issue by doing a slight spin on the Tribe’s published “Include Attendee Phone Number in the Event Attendee Report” extension. Simply changing the “_billing_phone” to “_transaction_id” got me working.

    in reply to: Attendees by Ticket display #1431615
    Pete
    Participant

    Okay, I think I see where you might be headed with the third party plugin. Are you thinking of using the “View My Tickets” capability (see attached .jpg), and then updating the tickets using the Update Tickets button? If so that would work but I can’t seem to update my own tickets right now! I saw another support ticket with the same issue, not being able to update the tickets. Any ideas?

    Thanks,

    in reply to: Attendees by Ticket display #1431495
    Pete
    Participant

    Hi,

    I’m not quite sure how this third party plugin would provide any assistance in doing what I want. I still don’t see any functionality to edit an order once placed. Am I missing something obvious?

    Thanks,
    Pete M.

    in reply to: Print tickets for pickup at "Will Call" window. #1362618
    Pete
    Participant

    Geoff,

    Thanks for digging into this deeper than you normally would. I’ll be looking forward to the upcoming release of the PDF Ticket Extension. In the meantime, I have solved this in a not very elegant way by adding the post_id as metadata within the order object. See the below.

    /*
     *  Setup to send an email to event organizer when new tickets are generated for an event they are running.
     *  At the same time add meta data to the Ticket object to store the Event_ID which will be used 
     *  to get the event organizers email address in function my_get_recipient.
     *
    */ 
    add_action( 'event_ticket_woo_attendee_created', 'tribe_woo_compat_cc', 10, 4 );
    function tribe_woo_compat_cc ( $attendee_id, $event_id, $order, $product_id ) {
     
        $return_value = add_post_meta($order->get_id(), 'post_id', $event_id, true);
    	tribe_tickets_cc_organizer( null, $event_id );
    }
    
    /*
     *  Filter the get_recipient() function to change the "TO:" email address of tickets that are of payment type 'cod'
     *  These COD tickets will be held at a "Will Call" desk for pickup after payment of fees.
    */
    add_filter( 'woocommerce_email_recipient_wootickets', 'my_get_recipient' , 10, 2);
    function my_get_recipient($to, $object) {
    /*
     *  Next line is required as this function is called without paramater data when clicking backend WooCommerce\Settings\Email
    */
            if ($to == '') {return $to;}  
            $order_id =$object->get_id();
            $post_id = get_post_meta( $order_id, 'post_id', true) ;
            $my_to =  tribe_get_organizer_email( $post_id, false );
            
    	//  If there's no valid email for the organizer, use the default will call email!
    	    if ( ! is_email( $my_to ) ){ $my_to = '[email protected]';}
    
    	     if ($object->get_payment_method() == 'cod' ) { $to = $my_to; }
    	     return $to;
    }  
    

    Perhaps this will benefit other users looking to do something similar,
    Pete

    in reply to: Print tickets for pickup at "Will Call" window. #1361570
    Pete
    Participant

    Thanks for the additional info. Reviewing the snippet it is obvious to me that I have some terminology mixed up.

    The function tribe_tickets_cc_organizer( $order_id = null, $post_id = null, $attendee_order_status = null ) uses the event’s post_id in order to retrieve the organizer’s email address and doesn’t use the order_id for anything. What I have is not the event post_id, I have the order object (in the example below, object_id=3700) which contains a reference to the product_id (in the below example product_id = 3560).
    Here is a dump of the variables passed to function tribe_tickets_cc_organizer( $order_id = null, $post_id = null, $attendee_order_status = null )

    [10-Oct-2017 15:50:25 UTC] Ticket Order ID:  
    [10-Oct-2017 15:50:25 UTC] Ticket Post ID: 3552
    [10-Oct-2017 15:50:25 UTC] Ticket Attendee Order Status:   

    Below is an error_log dump of the four variables passed into function tribe_woo_compat_cc ( $attendee_id, $event_id, $order, $product_id ).

    [10-Oct-2017 15:50:25 UTC] Attendee_id: 3701
    [10-Oct-2017 15:50:25 UTC] Event ID: 3552
    [10-Oct-2017 15:50:25 UTC] Order: {"id":3700,"parent_id":0,"status":"pending","currency":"USD","version":"3.1.2","prices_include_tax":false,"date_created":{"date":"2017-10-10 15:50:25.000000","timezone_type":1,"timezone":"+00:00"},"date_modified":{"date":"2017-10-10 15:50:25.000000","timezone_type":1,"timezone":"+00:00"},"discount_total":"0","discount_tax":"0","shipping_total":"0","shipping_tax":"0","cart_tax":"0","total":"24.00","total_tax":"0","customer_id":1,"order_key":"wc_order_59dcec41592c6","billing":{"first_name":"Pete","last_name":"Morelli","company":"SIR Branch 98","address_1":"216 County Down Ct","address_2":"","city":"Roseville","state":"CA","postcode":"95678","country":"US","email":"[email protected]","phone":"9167723257"},"shipping":{"first_name":"","last_name":"","company":"","address_1":"","address_2":"","city":"","state":"","postcode":"","country":""},"payment_method":"cod","payment_method_title":"Cash on delivery","transaction_id":"","customer_ip_address":"::1","customer_user_agent":"mozilla\/5.0 (windows nt 10.0; win64; x64) applewebkit\/537.36 (khtml, like gecko) chrome\/61.0.3163.100 safari\/537.36","created_via":"checkout","customer_note":"","date_completed":null,"date_paid":null,"cart_hash":"f196827e1d7dbf3bb76669b4a0085613","number":"3700","meta_data":[{"id":5803,"key":"_tribe_tickets_meta","value":{"3560":[{"name-of-attendee":" 56 "}]}}],"line_items":{"44":{}},"tax_lines":[],"shipping_lines":[],"fee_lines":[],"coupon_lines":[]} 
    
    [10-Oct-2017 15:50:25 UTC] Product ID: 3560 

    So my question is how do I get the event_id/post_id (i.e., 3552 above) given that I only have the order and product_id (respectively 3700 and 3560)?

    in reply to: Print tickets for pickup at "Will Call" window. #1361391
    Pete
    Participant

    When I said event coordinator in the above I really should have said organizer_email.

    in reply to: Print tickets for pickup at "Will Call" window. #1361345
    Pete
    Participant

    Hi Geof,

    Adapting what you suggested I coded up the following and added it to function.php in the child theme. It changes the email address to which the tickets are being sent to if the order payment method is “COD”.

    /*
    * Filter the get_recipient() function to change the “TO:” email address of tickets that are of payment type ‘cod’
    * $recipient = apply_filters( ‘woocommerce_email_recipient_’ . $this->id, $this->recipient, $this->object );
    /*

    add_filter( ‘woocommerce_email_recipient_wootickets’, ‘my_get_recipient’ , 10, 2);
    function my_get_recipient($to, $object) {
    $order_id =$object->get_id(); // gets the correct order id.
    error_log(‘Order ID ‘. $order_id);
    /*
    * Would like to get the coordinator’s email address here, and set $my_to_email to it.
    */
    $my_to_email = ‘[email protected]’;
    if ($object->get_payment_method() == ‘cod’ ) { $to = $my_to_email; }
    return $to;
    }

    All works fine as is; however, I would really like to retrieve the event coordinator’s email address and use that rather than a hardcoded address. I have the ticket_id but don’t know how to use ticket_id to get coordinator email address.

    Any help would be appreciated.

    Thanks,
    Pete

    in reply to: QR Scanner not checking in #1350466
    Pete
    Participant

    Never mind! It appears that since I’m just doing development that my site URL is not working correctly and hence the URL that is being put into the QR code is wrong. The URL that is being inserted is:
    http://mysite.org/new?event_qr_code=1&ticket_id=4122&event_id=4109 What works is:
    http://mysite.org/new/?event_qr_code=1&ticket_id=4122&event_id=4109 When using this URL the QR Check In process works.

    I tried changing the WebPress Address and Site Address in General Settings but it keeps deleting the final “/” Hope that once I get ready for production and move everything to final locations that this should resolve itself.

Viewing 9 posts - 1 through 9 (of 9 total)