• Resolved georg03

    (@georgdem)


    Hello,

    I need to add a gap between the price and currency symbol. How can I achieve this? It should look like this –> € 90 and not like this €90.

    Thanks
    Georg

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Andras Guseo

    (@aguseo)

    Hi @georgdem

    Do you still need help with this?

    On which page do you need this? The single event page or the list view, or all?
    Do you maybe have a link to your site?

    Thanks,
    Andras

    Plugin Contributor Andras Guseo

    (@aguseo)

    Here’s a little snippet that might help you with this.

    add_filter( 'tribe_get_cost', 'add_space_before_euro' );
    
    function add_space_before_euro ( $cost ) {
    	$cost = str_replace( '€', '€ ', $cost );
    	$cost = str_replace( '€', '€ ', $cost );
    
    	return $cost;
    }

    Let me know if that does the trick.

    Cheers,
    Andras

    Thread Starter georg03

    (@georgdem)

    Hi Andras,

    thanks for reaching out. I needed to fix this issue on single event page only and found a solution with adding this code to functions.php:

    function add_space_before_cost( $cost ) {
    return ” ” . $cost;
    }
    add_filter( ‘tribe_currency_cost’,’add_space_before_cost’);

    Let me know if there is any better way. However it would be nice to add this setting to the plugin settings page where you can choose currency symbol and position since it is the default notation in German.

    Thanks,
    Georg

    Thread Starter georg03

    (@georgdem)

    Oh great thanks for the snippet!

    Best,
    Georg

    Plugin Contributor Andras Guseo

    (@aguseo)

    Hi @georgdem,

    Your solution is good as well, though it doesn’t cover all cases. When you have tickets set up with Event Tickets Plus then it will not have an effect on the ticket box where visitors can choose how many tickets they want.
    Of course, if you don’t use Event Tickets Plus, then it’s irrelevant. ??

    If you would like to see this as a setting, then I recommend submitting it to our idea board here: https://evnt.is/ideas

    I am going to mark this thread as resolved. If you need anything else please open a new thread and we’ll be happy to help.

    Cheers,
    Andras

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Gap between currency symbol and price’ is closed to new replies.