wswebstuff

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Add Price info to tooltips in Week and Month view #967515
    wswebstuff
    Participant

    Hi Barry,

    Thanks for the help. I had caught that in my trials, and had left the code in tooltips.php untouched except to add:

    			[[ if(venue) { ]]
    			<p class="entry-venue">Venue: <a href="[[=venue_link]]">[[=venue_title]]</a></p>
    			[[ } ]]
    			[[ if(price) { ]]
    			<p class="entry-price">Price: [[=raw price]]</a></p>
    			[[ } ]]

    I’m thinking it might be my functions.php code that needs the tweak:

    //*-- Add Cost to Tooltip *//
    function post_cost_tribe( $json, $event, $additional ){
    
    	$venue = tribe_get_venue_id( $event );
    	if ( $venue ){
    		$json['venue'] = $venue;
    		$json['venue_link'] = tribe_get_venue_link( $venue, false );
    		$json['venue_title'] = tribe_get_venue( $venue );
    	}
    
    	if ( function_exists( 'wootickets_init' ) ){
    		$tickets = TribeWooTickets::get_instance()->get_tickets_ids( $event );
    		if ( ! empty( $tickets ) ){
    			$min = PHP_INT_MAX;
    			$max = -1;
    
    			foreach ( $tickets as $ticket ) {
    				$ticket = TribeWooTickets::get_instance()->get_ticket( $event, $ticket );
    				$min = min( array( $min, $ticket->price ) );
    				$max = max( array( $max, $ticket->price ) );
    			}
    
    			if ( $min == $max ){
    				$json['price'] = wc_price( $min );
    			} else {
    				$json['price'] = 'from ' . wc_price( $min ) . ' to ' . wc_price( $max );
    			}
    		}
    	}
    
    	return $json;
    }
    add_filter( 'tribe_events_template_data_array', 'post_cost_tribe', 10, 3 );

    I’m sorry I didn’t include my code in the first round of questions.

    Here is my full tooltip code:

    <script type="text/html" id="tribe_tmpl_tooltip">
    	<div id="tribe-events-tooltip-[[=eventId]]" class="tribe-events-tooltip">
    		<h4 class="entry-title summary">[[=title]]</h4>
    
    		<div class="tribe-events-event-body">
    			<div class="duration">
    				<abbr class="tribe-events-abbr updated published dtstart">[[=startTime]] </abbr>
    				[[ if(endTime.length) { ]]
    				-<abbr class="tribe-events-abbr dtend"> [[=endTime]]</abbr>
    				[[ } ]]
    			</div>
    			[[ if(imageTooltipSrc.length) { ]]
    			<div class="tribe-events-event-thumb">
    				<img src="[[=imageTooltipSrc]]" alt="[[=title]]" />
    			</div>
    			[[ } ]]
    			[[ if(excerpt.length) { ]]
    			<p class="entry-summary description">[[=raw excerpt]]</p>
    			[[ } ]]
    			[[ if(venue) { ]]
    			<p class="entry-venue">Venue: <a href="[[=venue_link]]">[[=venue_title]]</a></p>
    			[[ } ]]
    			[[ if(price) { ]]
    			<p class="entry-price">Price: [[=raw price]]</a></p>
    			[[ } ]]
    			<span class="tribe-events-arrow"></span>
    		</div>
    	</div>
    </script>
    in reply to: Events list widget malfunction #202233
    wswebstuff
    Participant

    I have deleted all of my widgets (related or not to TEC). Once done, Events Calendar widget works, but Events List continues to either show the most recent post name published (main page) or the page name of the active page.

    wswebstuff
    Participant

    Following the install of this morning’s upgrade (3.6), my issues have gone away.
    Thank you!

    in reply to: Events single page not found #179632
    wswebstuff
    Participant

    I am also having the same issues. However, I am pretty sure it’s a theme issue since going to one of the WP themes fixes it. I look forward to seeing what you find out.

    wswebstuff
    Participant

    Thank you so much for getting back to me so quickly. Apologies for the missing information. I am using the functions suggested by you here: https://theeventscalendar.com/support/forums/topic/mini-calendar-click-month-display-events-from-that-month/ (http://pastebin.com/eyeQ9QvR).

    The code is running at: site/wp-content/themes/activetheme/tribe-events/widgets/mini-calendar/grid.php.

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