Error in displayed price

Home Forums Ticket Products Event Tickets Plus Error in displayed price

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1115245
    marlieinthesouth
    Participant

    Hi,

    I have an issue with the price display on my list event. It was codded to display the higher price and it worked well for a while. Know it show 255€ which isn’t neither the higher nor the smaller nor the total of the tickets.

    Could you help me?

    emilie

    #1115394
    Nico
    Member

    Hi Emilie,

    Thanks for reachign out and sorry to hear about this issue. I’l help you getting this right.

    It was codded to display the higher price and it worked well for a while.

    Are you referring to a custom code snippet to make it work this way? If so can you please follow-up with the code?

    Also, can you please follow-up with a link to the event in your site where I can see this?

    Best,
    Nico

    #1115501
    marlieinthesouth
    Participant

    This reply is private.

    #1116341
    Nico
    Member

    Hi Emilie,

    Thanks for following-up! I reviewed the code provided in past threads and it seems that the function tribe_get_maximum_cost is in fact providing the highest cost of all events. So there’s seems to be no error here, to get the max cost of the event you are viewing you’ll need to do the following:

    Add this snippet to your theme functions.php file:

    function tribe_get_max_cost_single ( ) {

    $tribe_ecp = Tribe__Events__Main::instance();
    $post_id = $tribe_ecp->postIdHelper( null );

    $cost_utils = Tribe__Events__Cost_Utils::instance();

    $costs = $cost_utils->get_event_costs( $post_id );

    if ( ! $costs ) {
    return '';
    }

    return tribe_format_currency( $cost_utils->get_maximum_cost( $costs ) );

    }

    Once that’s in place just go ahead and replace the previous code in the single-event.php for this one:

    <span class="tribe-events-cost"><?php echo tribe_get_max_cost_single( ) ?></span>

    Give it a try and let me know about it,
    Best,
    Nico

    #1116363
    marlieinthesouth
    Participant

    Thnaks a lot!!

    #1116580
    Nico
    Member

    You are welcome Emilie 🙂

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Error in displayed price’ is closed to new replies.