Support

Home Forums Event Espresso Premium Surcharge Showing In Base Price

Surcharge Showing In Base Price

Posted: August 26, 2024 at 6:56 am

Viewing 5 reply threads


clubgetaway

August 26, 2024 at 6:56 am

Is there a way to remove the surcharges from showing in the base price of a ticket? I would like to only show them in the details under the subtotals for an event.


clubgetaway

August 26, 2024 at 7:01 am

Trying to subscribe to get updates on this topic


Rio

  • Support Staff

August 26, 2024 at 7:16 am

Can you send me direct link to that page please. You can mark your reply as private if you need to.

thanks


clubgetaway

August 26, 2024 at 7:18 am

This reply has been marked as private.


Rio

  • Support Staff

August 26, 2024 at 7:26 am

This reply has been marked as private.


clubgetaway

August 26, 2024 at 7:32 am

This reply has been marked as private.


Rio

  • Support Staff

August 26, 2024 at 8:02 am

I’m sorry, but there’s no option removing that using CSS. You may need to do custom code.

To give you an idea of the how complex the ticket selector template is you can take a look within:

\event-espresso-core-reg\modules\ticket_selector\templates\ticket_selector_chart.template.php

The template location is filterable which mean you can load your own version of the template, it is also passed the EE_Event object meaning you could also change this depending on the event it needed (although it would likely be better to add the logic within the template).

The filter that allows you to change the ticket selector template location is:

apply_filters( ‘FHEE__EE_Ticket_Selector__display_ticket_selector__template_path’, $templates[‘ticket_selector’], self::$_event );

A developer can use that the above to add any additional details you need, note that we do not provide support for custom templates, if you use a custom template you will need to make sure it is kept up to date with any changes we make to the default template.

you may need to connect here.
https://eventespresso.com/developers/event-espresso-pros/

thanks


Sam

  • Support Staff

August 26, 2024 at 8:12 am

Hi Jacob,

That section needs to show the final price including all the taxes.

However, you can try this code to see if that helps:

add_filter( 'FHEE__ticket_selector_chart_template__ticket_price', 'change_ee_ticket_selector_base_price_display', 10, 2 );

function change_ee_ticket_selector_base_price_display( $ticket_price, $ticket ) {

    $x =  $ticket->base_price();

    $y = $x->get('PRC_amount');

    return $y;
}

As this requires adding the code, you can create a site-specific plugin that helps to keep the code safe while updating the theme/plugin: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

The above code should work for this section: https://tinyurl.com/2ag3h6rl

Viewing 5 reply threads

The support post ‘Surcharge Showing In Base Price’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso