Posted: December 22, 2013 at 10:11 am
|
I have event with base price set to $0 and registration form includes a question that modifies the event price: http://d37toastmasters.org/wp-content/uploads/2013/12/ee-pic1_12-22-2103.jpg I would like to permanently remove “Free Event” description just above the Start Date. Thank you, Jake |
|
Hi Jake, If you want to remove it from ALL events it’s a just a little bit of CSS: /* for the event list */ .event_price { display: none; } /* for the single registration page */ .event_prices { display: none; } If you have events where the price needs to be displayed, you are going to have to edit the appropriate templates and do an IF statement to hide the price only if event price equals 0.00 |
|
Hi Dean, It is only for events with price = $0. Can you provide a name of php file (template) that needs to be modified and a simple code snipet? Thank you, Jake |
Hi Jake, You might be on an older version of Event Espresso because the “Free Event” label was removed from the registration page in version 3.1.36. If you look in pricing.php ~ line 441 you’ll see the line of code that displays the price there: $html .= '<span class="event_price_label">' . __('Price:', 'event_espresso') . '</span> <span class="event_price_value">' . $org_options['currency_symbol'] . number_format($result->event_cost, 2) . $message . $surcharge . '</span>'; This, and other instances where the price gets displayed can be wrapped in an if statement like Dean described. Here is one example: if ( $result->event_cost != '0.00' ) { $html .= '<span class="event_price_label">' . __('Price:', 'event_espresso') . '</span> <span class="event_price_value">' . $org_options['currency_symbol'] . number_format($result->event_cost, 2) . $message . $surcharge . '</span>'; } |
|
|
Hi Josh, We are running the latest version 3.1.36.1.P. Also, in what folder is pricing.php file located? Jake |
Hi Jake, It’s in /includes/functions/ |
|
|
I made the recommended change with the “if” statement listed above but my event is still showing “Free Event” verbiage. This event has a base price set to $0.00. Was this tested on your site and it it working for you as expected? Just to recap as to what my goal is here, I want to show the price for events with price != 0 and for the events with price = $0 I do not want to show “Free Event” verbiage. For these events I do not want to display any verbiage. Thank you, Jake |
Hi Jake,
Of course, here’s a screenshot: Did you earlier make modifications to the event_espresso_price_dropdown function and have it loading elsewhere? That might explain why you’re still seeing the “Free Event” text. The Free Event text was removed from the event_espresso_price_dropdown function in Event Espresso 3.1.36 and shouldn’t be displaying there anyway. |
|
|
Hi Josh, Thank you for the screenshot. My changes with the “if” statement are identical to yours. I do not recall ever making changes to event_espresso_price_dropdown function, but would be happy to check the details if you let me know where and what to look for. I also asked the hosting company to reset the caching used on the backend just to be sure there are no caching issues. Thank you, Jake |
|
I just realized that I’m also using Event Espresso – Price Modifier plugin, version 0.0.3.1.B. Not sure if this could be the culprit. Jake |
|
Hi Jake, Josh’s code does work, but only for the event registration page. I think, like me, you are still seeing the price on the event list. If that is the case you could edit the event_list_display.php file at approx line 78, where it states: <?php if ( $event->event_cost != '0.00' ) { ?> <p id="p_event_price-<?php echo $event_id ?>" class="event_price"><span class="section-title"><?php echo __('Price: ', 'event_espresso'); ?></span> <?php echo $org_options['currency_symbol'].$event->event_cost; ?></p> <?php } else { ?> <p id="p_event_price-<?php echo $event_id ?>" class="event_price"><span class="section-title"><?php echo __('Price: ', 'event_espresso'); ?></span> <?php echo __('Free Event', 'event_espresso'); ?></p> <?php } ?> And remove the code from the else statement, like so: <?php if ( $event->event_cost != '0.00' ) { ?> <p id="p_event_price-<?php echo $event_id ?>" class="event_price"><span class="section-title"><?php echo __('Price: ', 'event_espresso'); ?></span> <?php echo $org_options['currency_symbol'].$event->event_cost; ?></p> <?php } else { ?> <?php } ?> This will not display the price if it is zero – http://d.pr/i/hnCp |
|
Hi Dean, I do not believe I have event list defined. The “Free Event” verbiage is being displayed directly on the event registration page: http://d37toastmasters.org/wp-content/uploads/2013/12/ee_Free_Event_12-27-2013.jpg Thank you, Jake |
|
Hi Jake, OK, you were partially right, it’s the Seating Chart addon that is causing the issue. So, assuming you have that add on installed, in registration_page_display.php find (line 80 approx): if (defined('ESPRESSO_SEATING_CHART')) { $seating_chart_id = seating_chart::check_event_has_seating_chart($event_id); if ($seating_chart_id !== FALSE) { $display_price_dropdown = FALSE; } } and change it to if ( $event_cost != '0.00' ) { if (defined('ESPRESSO_SEATING_CHART')) { $seating_chart_id = seating_chart::check_event_has_seating_chart($event_id); if ($seating_chart_id !== FALSE) { $display_price_dropdown = FALSE; } } } If you dont have Seating Chart installed please advise what plugins you do have. |
|
Hi Dean, I do not have the Seating Chart plugin. I have the following plugins installed: Event Espresso by Event Espresso version 3.1.36.1.P Thank you, Jake |
Hi Jake, I notice from your previous threads you have the Custom Files Add-on installed (custom_functions.php) can you check in there for the event_espresso_price_dropdown function. |
|
|
Hi Tony, I’d be happy to check. What folder is this file suppose to be located in ? Jake |
If you are still currently using it it should be within /wp-content/uploads/espresso/ |
|
|
There are four subfolders there (gateways, languages, logs and templates) but I do not see the file there at all. Is it possible the file/folder is hidden? Thank you, Jake |
Hi Jake, Typically files are not hidden when you view them in an FTP client. The name of the file is custom_functions.php. However, Event Espresso functions can also be override by a custom snippets plugin (located in the plugins folder) or within a theme’s functions.php file. |
|
|
Ok, I think I figured it out. I downloaded all the web files locally on my computer and then ran Windows Grep to search for “Free Event” text string. I got the following list: wp-content\plugins\member_functions.php By changing the verbiage in each file I was able to determine that the changes needs to be done in wp-content\plugins\member_functions.php. By commenting out the line 455 I was able to successfully remove “Free Events” verbiage from my event description. Do I need to comment the line 456 as well? 455 //$html .= ‘<span class=”free_event”>’ . __(‘Free Event’, ‘event_espresso’) . ‘</span>’; Thank you, Jake |
|
Hi Jake, Please do not comment out the hidden input, it’s used by the plugin to help process to registration. |
|
Ok, thanks. Jake |
The support post ‘Free Event is not free’ 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.