Forum Replies Created
-
AuthorPosts
-
Dan Feeley
ParticipantAh yes, good catch. Our ticket section is currently above the content.
So I would like to move this between the content and event details.May 11, 2016 at 6:25 am in reply to: Additional Attendee information on admin email and receipt #1113141Dan Feeley
ParticipantI was looking to do this as well, you may want to read over this thread and see if what I did will work for you. https://theeventscalendar.com/support/forums/topic/have-the-additional-fields-appear-on-invoice/
This will add the fieldset questions and answers on the order invoice and on the admin order email.
Dan Feeley
ParticipantHere you go: https://gist.github.com/PthPndr/943bd38925ccc0e55b5a4f97835ad821
There are three functions.
- The first function adds the questions and answers to the order details at the time of purchase.
- The second function displays the meta on the order details page (optional)
- The third function displays the meta on the order invoice page and emails.
All you need to do is add them to your functions.php file.
And @Barry, I know you can’t support this but if you happen to notice anything blatantly wrong please let me know.
Dan Feeley
ParticipantI got it to work. I was already displaying the additional fields on the WooCommerce order details so using the WooCommerce action that Barry mentioned allowed me to display the fields on the order invoice and emails.
I would be happy to share my code with you if you want it. However (two things), Since technically the questions can be changed during the sale of an event for any reason, I am storing the questions and answers at the time of purchase in the database with the order. Then I use the above action to display the data in the invoice.
Secondly, I also am not a developer so my code may not be perfect. Below is an example of what it looks like (don’t mind the gibberish, I was testing multiple purchases and special characters).
Dan Feeley
ParticipantGlad I stumbled across this thread. That WooCommerce action is exactly what I was looking for. It works perfectly, thanks Barry.
April 6, 2016 at 7:10 am in reply to: mandatory attendee information field evasion-enabling bug #1098908Dan Feeley
Participant@Nico,
My apologies for the re-post but I was poking around the forums this morning and came across a post from George with a method for retrieving just the ticket fieldset meta. Using this method allowed me to simplify the functions so I wanted to share the new ones in case someone wanted to use them.
Same as before, first function just looks for fieldset meta being enabled and the second function looks for the meta being required.
<?php function mse_wc_cart_item_quantity( $product_quantity, $cart_item_key, $cart_item ){ $product_id = $cart_item['product_id']; $ticket_meta = Tribe__Tickets_Plus__Main::instance()->meta()->get_meta_fields_by_ticket( $product_id ); if ( !empty($ticket_meta) ) { $cart_item = WC()->cart->cart_contents[ $cart_item_key ]; $product_quantity = $cart_item['quantity']; } return $product_quantity; } add_filter( 'woocommerce_cart_item_quantity', 'mse_wc_cart_item_quantity', 10, 3 );<?php function mse_wc_cart_item_quantity( $product_quantity, $cart_item_key, $cart_item ){ $product_id = $cart_item['product_id']; $ticket_meta = Tribe__Tickets_Plus__Main::instance()->meta()->get_meta_fields_by_ticket( $product_id ); if ( !empty($ticket_meta) && $ticket_meta[0]->required == "on" ) { $cart_item = WC()->cart->cart_contents[ $cart_item_key ]; $product_quantity = $cart_item['quantity']; } return $product_quantity; } add_filter( 'woocommerce_cart_item_quantity', 'mse_wc_cart_item_quantity', 10, 3 );April 5, 2016 at 9:17 am in reply to: mandatory attendee information field evasion-enabling bug #1098361Dan Feeley
Participant@Nico,
I found a way to lock down particular items in the cart based on the fieldset meta. I wanted to post it here in case @Benjamin or anyone else would be interested. I am not a developer, so if you see anything completely off please let me know. Here are two snippets, you only need one of them in your functions.php.
The first snippet will lock down an item if the ticket contains fieldset meta (required or not).
<?php function mse_wc_cart_item_quantity( $product_quantity, $cart_item_key, $cart_item ){ $product_id = $cart_item['product_id']; $ticket_meta = get_post_meta( $product_id ); if ( isset($ticket_meta['_tribe_tickets_meta_enabled']) && $ticket_meta['_tribe_tickets_meta_enabled'][0] == 1 ) { if ($ticket_meta['_tribe_tickets_meta_enabled']) { $cart_item = WC()->cart->cart_contents[ $cart_item_key ]; $product_quantity = $cart_item['quantity']; } } return $product_quantity; } add_filter( 'woocommerce_cart_item_quantity', 'mse_wc_cart_item_quantity', 10, 3 );This second snippet only locks down the cart item if the fieldset meta is “required”.
<?php function mse_wc_cart_item_quantity( $product_quantity, $cart_item_key, $cart_item ){ $product_id = $cart_item['product_id']; $ticket_meta = get_post_meta( $product_id ); if ( isset($ticket_meta['_tribe_tickets_meta_enabled']) && $ticket_meta['_tribe_tickets_meta_enabled'][0] == 1 ) { $tribe_tickets_meta = unserialize($ticket_meta['_tribe_tickets_meta'][0]); $ticket_meta_required = $tribe_tickets_meta[0]['required']; if ($ticket_meta_required == "on") { $cart_item = WC()->cart->cart_contents[ $cart_item_key ]; $product_quantity = $cart_item['quantity']; } } return $product_quantity; } add_filter( 'woocommerce_cart_item_quantity', 'mse_wc_cart_item_quantity', 10, 3 );April 1, 2016 at 5:21 am in reply to: Known Conflicts with The Events Calendar Pro and Divi Theme #1096874Dan Feeley
ParticipantActually, I may. Thanks for including the picture. I just tested it on my system and it appears that the TinyMCE toolbar is what is causing the issue. I just installed it on my system and the Divi Builder disappeared.
April 1, 2016 at 3:43 am in reply to: Known Conflicts with The Events Calendar Pro and Divi Theme #1096845Dan Feeley
ParticipantWe use Divi and Events Calendar exclusively with almost no issues. They work very well together.
@pderathe, the issue with the builder not working on custom post types is Divi’s not the Events Calendar. Elegant Themes does not appear to want to support it. There is a workaround for it that we have been using since Divi 2.4, you just need to add it to your functions.php.@Hunter, if I can’t post this please just delete it.
add_filter( 'et_builder_post_types', 'rbs_et_builder_post_types' ); function rbs_et_builder_post_types ($post_types) { $custom_post_types = array ( 'tribe_events', // 'sfwd-courses', - add more CPT's if needed ); $new_post_types = array_merge($post_types, $custom_post_types); return $new_post_types; }Dan Feeley
ParticipantYeah, I can understand that.
Thanks George, it works great.March 28, 2016 at 8:58 am in reply to: mandatory attendee information field evasion-enabling bug #1094818Dan Feeley
Participant@Nico,
I’m not sure about the OP but your solution doesn’t sound too bad to me. I know WooCommerce Bookings does the same thing and only displays the quantity in the cart.
I tried searching (with no luck). Do you know how to remove the quantity selector of the event in the cart?
Dan Feeley
ParticipantI should add that just to be safe I double-checked it on a completely clean system with nothing but Twenty Fifteen, WooCommerce, and the Events Calendar installed and I got the same results.
Dan Feeley
ParticipantI am seeing the same issue.
Viewing the month view on a mobile device you can’t select any day other than today and the “thumbnail view” of events for the day under the month is no longer visible.

Dan Feeley
ParticipantHunter,
Thank for the work you and George did, it works perfectly.
Quick question, this functionality was in 4.0 and got removed in 4.1 when the attendee list columns changed. Do you know if it was purposely removed or will it be making a return?
If it was on purpose I will look into starting a UserVoice for it.
Dan Feeley
ParticipantThank you for the info George. I understand the part about custom code. Unless I am doing something wrong this just seems to be an incomplete feature. Tribe went through the trouble of bringing the attendee information all the way to the single event and then just chose to display a number of avatars??
Anyway, I got what I was going for. The “alt” text for the avatar image was already provided with the user name in the array, I just needed to copy it to the “title” text to get me the “tooltip hover”.
-
AuthorPosts
