-
AuthorPosts
-
February 21, 2015 at 8:52 pm #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,
HolgerFebruary 23, 2015 at 10:06 am #400461Hey 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!
IsmaelFebruary 23, 2015 at 11:08 am #400508Hi 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,
HolgerFebruary 24, 2015 at 4:39 pm #401497Hi!
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,
AndyFebruary 25, 2015 at 6:17 pm #402261Hi 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,
HolgerFebruary 26, 2015 at 9:32 am #402531Hi!
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,
IsmaelFebruary 26, 2015 at 9:53 am #402539Hi 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,
HolgerFebruary 26, 2015 at 11:39 am #402581February 26, 2015 at 11:48 am #402584Hi, 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,
HolgerFebruary 26, 2015 at 11:53 am #402586Hi!
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!
IsmaelFebruary 26, 2015 at 12:26 pm #402608Ismael, 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,
HolgerFebruary 27, 2015 at 6:18 am #403183Hi!
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,
IsmaelFebruary 27, 2015 at 6:58 am #403198Hi, 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,
HolgerFebruary 27, 2015 at 9:06 am #403261Hi!
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!
IsmaelFebruary 27, 2015 at 9:29 am #403266Hi 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 addedEvents 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 fieldBest regards,
HolgerFebruary 27, 2015 at 10:47 am #403292Hi!
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,
IsmaelFebruary 27, 2015 at 11:05 am #403303Ismael,
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,
HolgerFebruary 28, 2015 at 12:35 pm #403819 -
AuthorPosts
- The topic ‘Currencies in Events Calendar Element shown incorrect’ is closed to new replies.