Home › Forums › Calendar Products › Events Calendar PRO › Issues with how events are displayed in Lists vs. Calendar View
- This topic has 10 replies, 4 voices, and was last updated 7 years, 6 months ago by Inbok.
-
AuthorPosts
-
September 22, 2016 at 4:35 pm #1167710InbokParticipant
Hi,
I am both a Tickets PRO and Calendar PRO customer.
We’re using your plugins to process registrations and payments for our recurring art classes.
We are already aware of how a recurring event and payment works: this actually works fine for us since art classes are paid for by the series, rather than per class.
However, the way these classes appear in the List and Calendar views can be very misleading.
If we make one art class a recurring event with 8 sessions, all 8 sessions appear correctly in the Month view (http://joinmsad.com/classes/2016-10/ — Children’s Studio 6-7) . However, if you look at the List view, it looks like 8 classes are being offered at $260 each – http://joinmsad.com/classes/list/.
On the other hand: if instead of using a recurring event, we just make the event a date range (Oct 12 to Nov 30), this makes the reverse of the above situation: the List view is correct (8 sessions offered at $260), while the Month View is obviously wrong (one class every day in the date range).
This puts us in the awkward situation of deciding whether we want to just use the List View, or the Month View. We want both views.
How do we do this?
Thanks,
September 23, 2016 at 12:33 pm #1168095NicoMemberHi there Inbok,
Thanks for getting in touch with us! I’ll help you getting this right 🙂
Do you think a suitable solution might be to just show the price in the first event of the series maybe? If not, maybe we can add some text after the price?
Please let me know about it and I’ll send the code needed to make this tweak,
Best,
NicoSeptember 23, 2016 at 12:44 pm #1168104InbokParticipantHi Nico,
Yes, having only the first event in a series display a price would be a good start.
It would be even better if purchasing tickets was disabled on all subsequent events in a series (I haven’t tested if manually removing them on each single event page works or not without breaking the recurring events).
The best solution from a UI/UX perspective would be for there to be a visual cue: ie. the first event in a series is displayed as-is, while subsequent events in a series are nested or faded without mouseover or have different coloured headers.
I don’t know if the best solution is possible with custom css code, but if it is, that’d be perfect. If not, we’ll settle for disabling the price/purchasing on subsequent events and request the feature 🙂
September 26, 2016 at 10:29 am #1168818InbokParticipantBump – still need help with this. Thanks!
September 26, 2016 at 4:32 pm #1168959NicoMemberThanks for following up @Inbok and sorry for the delay in my reply! We don’t monitor the forums during the weekends so Mondays are pretty busy!
Yes, having only the first event in a series display a price would be a good start.
Great, I prepared the snippet below for you. Just paste the code in your theme’s (or child theme’s) functions.php file:
/* Tribe, hide cost for recurring instances other than the first */
function tribe_hide_cost_for_recurring_instances ( $cost, $post_id, $with_currency_symbol ) {$event = tribe_events_get_event( $post_id );
if ( $event->post_parent > 0 ) {
$cost = '';
}return $cost;
}add_filter( 'tribe_get_cost', 'tribe_hide_cost_for_recurring_instances', 10, 3 );
It would be even better if purchasing tickets was disabled on all subsequent events in a series
It’s possible, paste the code below as explained above:
/* Tribe, remove tickets form for recurring instances other than the first */
function tribe_remove_tickets_from_recurring_instances ( ) {global $post;
// bail if The Events Calendar or Event Tickets Plus are not active
if ( !class_exists( 'Tribe__Events__Main' ) || !class_exists('Tribe__Tickets_Plus__Commerce__WooCommerce__Main') ) return false;// bail if not single event page or if it's not a recurring event instance
if ( !is_singular( Tribe__Events__Main::POSTTYPE ) || $post->post_parent == 0 ) return false;// remove the tickets form for recurring instances
remove_action( 'tribe_events_single_event_after_the_meta', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form' ), 5 );}
add_action ( 'wp' , 'tribe_remove_tickets_from_recurring_instances' );
Regarding other style changes to the recurring event instances, that’s possible as well. You’ll need to create some template overrides for the template that renders the ‘single-event’ part of the event views. Check the themer’s guide for the instructions on how to do this.
Please let me know if this helps,
Best,
NicoSeptember 26, 2016 at 6:40 pm #1168980InbokParticipantHi @nico
Thanks for the reply!
The first code worked as intended, but the 2nd one (removing tickets for subsequent events) didn’t.
List view (correctly shows no prices on subsequent): http://joinmsad.com/classes/list/
Single event view for subsequent event (still able to buy tickets): http://joinmsad.com/class/childrens-studio-6-7-2016-10-26/2016-10-19/
September 27, 2016 at 1:39 pm #1169478NicoMemberThis reply is private.
September 27, 2016 at 9:22 pm #1169628InbokParticipantThis reply is private.
September 29, 2016 at 5:58 am #1170308NicoMemberThis reply is private.
October 21, 2016 at 9:35 am #1180645Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Issues with how events are displayed in Lists vs. Calendar View’ is closed to new replies.