Carlos Henrique

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • in reply to: Ateendee data in ticket e-mail #1137445
    Carlos Henrique
    Participant

    George,

    The code is not working. It is not removing the action.

    Any toughts why?

    Thanks

    in reply to: Ateendee data in ticket e-mail #1137204
    Carlos Henrique
    Participant

    George,

    I’m trying not to edit the core files, I’m thinking if it is possible to do a remove_action in the functions.php of my theme and then do a add_action if my customization. I’m talking about the following action found in the Render.php file.

    add_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $this, 'ticket_email_meta' ) );

    Is it possible to hook this in my function file?

    Thanks

    in reply to: Ateendee data in ticket e-mail #1137086
    Carlos Henrique
    Participant

    Hi George!

    I’m almost there. Send the meta data in the e-mail is what I need.

    One last thing: can I remove the default action and create a new one with my tweaks in the functions.php file? If so, can you assist me?

    Thanks

    in reply to: Ateendee data in ticket e-mail #1136935
    Carlos Henrique
    Participant

    Hi George!

    Thanks exactly what I needed! Now I just need to hide some of the data. I only need to show first and last name and the company name. Can I customize this overriding email.php template file or I is it in another file?

    Thanks

    in reply to: Ateendee data in ticket e-mail #1135924
    Carlos Henrique
    Participant

    Hi George!

    I don’t need all the meta data into the e-mail, but I need at least the name of the attendee and not the name of the buyer. In this case, the attendee is the person how buys the tickets.

    As my website will allow companies to by multiple tickets, each ticket has to have the attendee data and not the buyer data. As the buyer, oftenly is a secretary.

    I’ve attached a screenshot of the attendees meta data.

    Thanks for your help.

    in reply to: Ateendee data in ticket e-mail #1135289
    Carlos Henrique
    Participant

    Hello Geoff!

    I’m still trying to get the meta data into the e-mail.

    Looking the Render.php file I found the function that builds the table in the back-end. Ins’t it possible to get the meta data using this code?

    	public function table_meta_data( $item ) {
    		wp_enqueue_style( 'event-tickets-meta' );
    		wp_enqueue_script( 'event-tickets-meta-report' );
    
    		$meta_fields = Tribe__Tickets_Plus__Main::instance()->meta()->get_meta_fields_by_ticket( $item['product_id'] );
    		$meta_data = get_post_meta( $item['attendee_id'], Tribe__Tickets_Plus__Meta::META_KEY, true );
    
    		?>
    		<tr class="event-tickets-meta-row">
    			<td colspan="3"></td>
    			<td colspan="4">
    				<dl>
    					<?php
    					foreach ( $meta_fields as $field ) {
    						if ( 'checkbox' === $field->type && isset( $field->extra['options'] ) ) {
    							$values = array();
    							foreach ( $field->extra['options'] as $option ) {
    								$key = $field->slug . '_' . sanitize_title( $option );
    
    								if ( isset( $meta_data[ $key ] ) ) {
    									$values[] = $meta_data[ $key ];
    								}
    							}
    
    							$value = implode( ', ', $values );
    						} elseif ( isset( $meta_data[ $field->slug ] ) ) {
    							$value = $meta_data[ $field->slug ];
    						} else {
    							continue;
    						}
    
    						if ( '' === trim( $value ) ) {
    							$value = '&nbsp;';
    						}
    
    						?>
    						<dt class="event-tickets-meta-label_<?php echo esc_attr( $field->slug ); ?>"><?php echo esc_html( $field->label ); ?></dt>
    						<dd class="event-tickets-meta-data_<?php echo esc_attr( $field->slug ); ?>"><?php echo $value ? esc_html( $value ) : '&nbsp;'; ?></dd>
    						<?php
    					}
    					?>
    				</dl>
    			</td>
    		</tr>
    in reply to: Ateendee data in ticket e-mail #1134636
    Carlos Henrique
    Participant

    Geoff,

    This is the code for this specific field:

    <div class="tribe-tickets-meta tribe-tickets-meta-text tribe-tickets-meta-required">
    <label for="tribe-tickets-meta_name">Name</label>
    <input type="text" id="tribe-tickets-meta_name" class="ticket-meta" name="tribe-tickets-meta[][name]" value="" required>
    </div>

    I’ve tried to echo that code and also got Internal Error on the checkout page.

    in reply to: Ateendee data in ticket e-mail #1134587
    Carlos Henrique
    Participant

    Hi Geoff,

    I’ve placed the code into the template file but I doing some wrong. I getting a Internal Error on checkout page and I insert the code.

    Could you assist me a little more?

    I have place the following code inside the for-each loop for de meta ID “tribe-tickets-meta_name”:

    $ticket_meta_name = get_post_meta( $attendee_id, Tribe__Tickets_Plus__Meta::tribe-tickets-meta_name, true );

    Then I placed this inside the table:

    <?php echo $ticket_meta_name; ?>

    Thanks!

    in reply to: Ateendee data in ticket e-mail #1134475
    Carlos Henrique
    Participant

    Accidentally I hit the correct answer button! My bad!

    in reply to: Ateendee data in ticket e-mail #1134473
    Carlos Henrique
    Participant

    Actually I don’t need the e-mail to be sent to the attendees. It’s OK that the e-mail is sent only to the buyer. The problem is that I need each ticket with it’s attendee data. The system only gives me the purchaser name.

    Looking throught the plugin files I found the table_meta_data function, wich builds the table of tickets and attendees meta in the back-end. Is there any way I can get this meta_data e pass it to the e-mail. That’s ok if I get all the meta data.

    This data is stored somewhere in BD. I should be able to get it since it’s been displayed in the back-end for each ticket.

    Thanks!

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