This event has passed / tickets not yet available

Home Forums Ticket Products Event Tickets Plus This event has passed / tickets not yet available

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1144339
    Jonathan
    Participant

    This doesn’t seem very semantic. The event is over, and the tickets-unavailable class outputs “tickets not YET available.”

    #1144480
    Geoff B.
    Member

    Good evening Jonathan and welcome back!

    Thank you for reaching out to us.
    I would love to help you with this topic.

    You will probably find that this happens mostly with events where there is a ticket sale start and/or end date.

    Depending on what you prefer, you might:

    1. Simply hide those messages with CSS
    2. Remove them altogether from the code – using a template customization.

    Let me know what you would prefer.

    Have a great day!

    Geoff B.

    #1144552
    Jonathan
    Participant

    I can certainly remove them with CSS, but in instances where I’ve posted an event that doesn’t yet have tickets available, it would be handy. It just shouldn’t show up after the event is over. It doesn’t make sense. Hopefully this is an item you can roll into the next release.

    #1144904
    Geoff B.
    Member

    Hey Jonathan,

    Thank you for writing back.

    Actually, you could completely customize this to your needs using a snippet in your Child Theme’s functions.php

    The function in charge of the triggers can be found at line 1272 of /the-events-calendar/vendor/tickets/src/Tribe/Tickets.php

    A simple filter should do the trick.

    That being said, I can totally see how this would be a cool feature to have.
    If you don’t mind, could you please suggest it here: https://tribe.uservoice.com/forums/195723-feature-ideas

    This way other users can vote on it too.

    Let me know if you need help with the snippet.

    Best regards,

    Geoff B.

    #1145110
    Jonathan
    Participant

    I don’t read php, but it appears that the code below should function as I thought.

    My event has passed, but it states, “Tickets are not yet available” instead of, “Tickets are no longer available.”

    Code:

    
    /**
    		 * Returns a tickets unavailable message based on the availability slug of a collection of tickets
    		 *
    		 * @since 4.2
    		 *
    		 * @param array $tickets Collection of tickets
    		 *
    		 * @return string
    		 */
    		public function get_tickets_unavailable_message( $tickets ) {
    			$availability_slug = $this->get_availability_slug_by_collection( $tickets );
    			$message = null;
    
    			if ( 'availability-future' === $availability_slug ) {
    				$message = __( 'Tickets are not yet available.', 'event-tickets' );
    			} elseif ( 'availability-past' === $availability_slug ) {
    				$message = __( 'Tickets are no longer available.', 'event-tickets' );
    			} elseif ( 'availability-mixed' === $availability_slug ) {
    				$message = __( 'There are no tickets available at this time.', 'event-tickets' );
    			}
    
    			/**
    			 * Filters the unavailability message for a ticket collection
    			 *
    			 * @var string Unavailability message
    			 * @var array Collection of tickets
    			 */
    			$message = apply_filters( 'event_tickets_unvailable_message', $message, $tickets );
    
    			return $message;
    		}
    		// end Helpers
    
    #1145116
    Jonathan
    Participant

    Link to my event: https://thrownstone.org/event/fields-blue-glow/

    Attached image shows the past date set for it.

    screenshot

    • This reply was modified 9 years, 9 months ago by Jonathan.
    #1145123
    Jonathan
    Participant

    Link to my event: https://thrownstone.org/event/fields-blue-glow/

    Attached image shows the past date set for it.

    #1145296
    Geoff B.
    Member

    Good afternoon Jonathan,

    Thank you for writing back, for the link and for the screenshot.

    You are absolutely right. For past events, it should read exactly as you said.

    I have researched this some more and it turns out it is a bug!
    Unfortunately, I cannot commit to a release date for a fix at this point. But you will be contacted as soon as there is one.

    Thank you for bringing this to our attention.

    Best regards,

    Geoff B.

    #1145306
    Jonathan
    Participant

    Woohoo! I caught a bug!

    #1145513
    Geoff B.
    Member

    Good morning Jonathan,

    I wish all of our customers loved bugs as much as you do 😉

    Thank you for finding this.

    On our end, we actually don’t like bugs, but we do enjoy squashing them 🙂

    Have a good week-end,

    Geoff B.

    #1154025
    Support Droid
    Keymaster

    Hey 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

    #1158343
    Geoff
    Member

    Hey there, Jonathan! Just a heads up that we released Event Tickets and Event Tickets Plus 4.2.6 moments ago and it included a fix for this issue(with a hat-tip to you). Please do update when you have the chance and definitely let us know if you continue to have any issues at all.

    Thanks so much for reporting this and for your patience while we worked on a fix. 🙂

    Cheers!
    Geoff

    #1167468
    Support Droid
    Keymaster

    Hey 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

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘This event has passed / tickets not yet available’ is closed to new replies.