Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #400120

    Hi,
    I have different currencies for different events using the events calendar plugin. In the various list views of the plugin itself the currencies show correctly. In the events calendar element of the avia builder I get only the currency that is set as default in the plugin settings. Any chance to correct this? I am not sure whether the plugin programmer will provide support for this issue, since it is theme specific.

    Best regards,
    Holger

    #400461

    Hey Holger!

    Thank you for using Enfold.

    You can change the Currency Symbol for each event. If you don’t mind, we would to like to see the actual event page with the currency symbol issue.

    Cheers!
    Ismael

    #400508

    Hi Ismael,

    I know that I can change the currency symbol for each event and that is what I have done. It shows correctly in the list or event views (see first event here http://infotropic.ru/events/list/ or the event view here http://infotropic.ru/event/global-law-summit/). But when I use the Events Calendar element from the avia editor, I get the currency symbol I use as default (see http://infotropic.ru/aaa-test/, first event shows the руб. instead of the “£” symbol).

    Best regards,
    Holger

    #401497

    Hi!

    are you using any cache plugin? If yes go into it’s settings and switch off caching. Then switch off your plugins and finally clear your browser cache and check if things get better.

    Best regards,
    Andy

    #402261

    Hi Andy,

    No, I don’t use a cache plugin. But I deactivated all plugins (except the events calendar plugin, of course) and cleared the cache. Didn’t help. Frankly, I didn’t expect it to help – the currency signs are displayed correctly in the list view of the plugin. So it doesn’t seem to be a problem with caching.

    Best regards,
    Holger

    #402531

    Hi!

    Alright. Please edit config-templatebuilder > avia-shortcodes > events_upcoming.php. Find this code on line 132:

    $price  = tribe_get_cost( $entry->ID, true );
    

    Replace it with:

    $cost   = tribe_get_cost( $entry->ID, false);
    					$symbol = tribe_get_event_meta( $entry->ID, '_EventCurrencySymbol', true );
    					$rev 	= tribe_get_event_meta( $entry->ID, '_EventCurrencyPosition', true );
    					if($rev === 'prefix' && $cost !== '') {
    						$price = $symbol . " " . $cost;
    					} elseif($rev = 'suffix' && $cost !== '') {
    						$price = $cost . " " . $symbol;
    					} else {
    						$price = __( "Free", 'tribe-events-calendar' );
    					}

    Best regards,
    Ismael

    #402539

    Hi Ismael,

    thanks, now the correct currency symbol is shown. But now there are two new problems:

    1. The currency symbol is always placed before the price, although the default position in the plugin settings is after the price (I set the “before the price” position manually for certain events). This looks just silly for our main currency. Is there a way to inherit the position from the event settings?

    2. The default currency symbol is shown before the word “Free” for free events.

    Best regards,
    Holger

    #402581

    Hi!

    We updated the code above. Please use that instead.

    Best regards,
    Ismael

    #402584

    Hi, now the currency symbol is in the right place, thanks a lot. But it still shows the symbol after the “Free” for free events. Any chance to get rid of it?

    Best regards,
    Holger

    #402586

    Hi!

    This should work now:

    $cost   = tribe_get_cost( $entry->ID, false);
    					$symbol = tribe_get_event_meta( $entry->ID, '_EventCurrencySymbol', true );
    					$rev 	= tribe_get_event_meta( $entry->ID, '_EventCurrencyPosition', true );
    					if($cost === 'Free') {
    						$price = __( "Free", 'tribe-events-calendar' );
    					} elseif($rev == 'prefix') {
    						$price = $symbol . " " . $cost;
    					} elseif($rev == 'suffix') {
    						$price = $cost . " " . $symbol;
    					} 

    Cheers!
    Ismael

    #402608

    Ismael, this workaround works, but it messes with the plugin itself. In order to have an event to be listed as free of charge, you have to put a “0” into the cost field. If you don’t, it shows nothing at all. OK, I will probably change the currency symbol to something I can put in front of the price.

    Best regards,
    Holger

    #403183

    Hi!

    I tested this on my installation and leaving the cost blank renders the “Free” text. Are you sure you added the latest code?

    Best regards,
    Ismael

    #403198

    Hi, Ismael,

    that’s correct, the “Free” is shown in the “Upcoming events” element of Enfold. But if you leave the cost field in the event description empty, you do not get the “Free” in the list view of the plugin itself. The list view depends on the ‘0″ in the cost field. Otherwise it leaves the cost empty. In other words – there is a conflict between the plugin and the integration into avia of the theme. So I have to decide – either have the “Free” in the “Upcoming events” element of Enfold or have the “Free” in the list view of the plugin itself. Would be better to have both, but I don’t know whether that’s possible.

    Best regards,
    Holger

    #403261

    Hi!

    Alright. Thank you for the info. Can you please provide a link a to the actual event page? What happens if you put “Free” in the cost field?

    Cheers!
    Ismael

    #403266

    Hi Ismael,

    If I put “Free” in the cost field, it shows “Free” on the event page and the events list view. But then the currency symbol returns o the “Upcoming events” element.

    Here are the links to the various pages^
    “Upcoming events” element: http://infotropic.ru/aaa-test/page/2/
    The third event from the top is one where I put nothing into the cost field
    The fourth event from the top is one where I put “Free” into the cost field – you see the “руб.” currency added

    Events list view: http://infotropic.ru/events/
    The third event from the bottom is one where I put nothing into the cost field
    The second event from the bottom is one where I put nothing into the cost field

    Best regards,
    Holger

    #403292

    Hi!

    Alright. This seems to do the trick:

    $cost   = tribe_get_cost( $entry->ID, false);
    					$symbol = tribe_get_event_meta( $entry->ID, '_EventCurrencySymbol', true );
    					$rev 	= tribe_get_event_meta( $entry->ID, '_EventCurrencyPosition', true );
    					if($cost === 'Free') {
    						$price = __( "Free", 'tribe-events-calendar' );
    					} elseif($rev == 'prefix') {
    						$price = $symbol . " " . $cost;
    					} elseif($rev == 'suffix') {
    						$price = $cost . " " . $symbol;
    					} 

    NOTE: Enter a 0 (zero) for events that are free or leave blank to hide the field.

    Regards,
    Ismael

    #403303

    Ismael,

    now it works. By the way, I had to change the “Free” in the code to the Russian equivalent (the plugin automatically translates). Guess, this was the problem from the beginning, since the code was looking for “Free” and didn’t find it. Thanks for your effort! Case closed.

    Best regards,
    Holger

    #403819

    Hey!

    Glad you finally got it solved :)

    Best regards,
    Rikard

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Currencies in Events Calendar Element shown incorrect’ is closed to new replies.