Support

Home Forums Event Espresso Premium Display all prices in the category page

Display all prices in the category page

Posted: January 11, 2014 at 9:05 pm

Viewing 9 reply threads


Robin Jennings

January 11, 2014 at 9:05 pm

I’m hoping to be able to display all the various prices in the main event page so people can see the difference between Adult Price/ Concession/ Child in the initial overview of the event rather than as a dropdown on the Registration page.

Some of the prices vary widely so it will turn potential students off. Thanks again.

http://www.match.vic.edu.au/courses/


Josh

  • Support Staff

January 13, 2014 at 11:08 am

Hi Robin,

There is a bit of template hacking that can be done to make this happen. The example code in this gist does exactly what you’re looking to do:

https://gist.github.com/sethshoultes/ab1e992668cf3166a686


Blair

January 13, 2014 at 12:23 pm

Hi Robin,

I have the same requirement and tried the code on the link provided and it did not work. I also tries another suggestion of copying registration_page_display.php & registration_page.php to public_html/wp-content/uploads/espresso/templates and adding the following code to line 160 in the display.php file

<p class="event_prices"><?php //echo event_espresso_price_dropdown($event_id);
//Show pricing in a dropdown or text ?></p>

It did not work either…:(


Josh

  • Support Staff

January 13, 2014 at 12:47 pm

Hi Blair,

In this case, you should not alter any of the code for registration_page_display.php or registration_page.php. These templates do not load the event list. The one template that needs to have a line of code added is:

templates/event_list_display.php line 80 where it says:

<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>

you replace the above with:

<?php do_action('action_hook_espresso_price_list', $event_id);?>


Blair

January 13, 2014 at 1:22 pm

my template folder is emplty, do I need to copy event_list_display.php over?


Blair

January 13, 2014 at 1:26 pm

when I conduct a search I can not find a file called event_list_display.php


Josh

  • Support Staff

January 13, 2014 at 2:04 pm

event_list_display.php is in the templates folder of the Event Espresso plugin. It can be copied over to your active WordPress theme’s folder if you’d like to prevent overwriting on an update.


Blair

January 13, 2014 at 2:25 pm

That worked to remove the pricing which will help reduce the visitors confusion over event pricing. Do you have a solution for displaying the various prices associated with an event…early bird, regular, member, non-member?


Josh

  • Support Staff

January 13, 2014 at 3:21 pm

The solution in Seth’s gist displays the regular and member pricing in a list. Here’s that link again:

https://gist.github.com/sethshoultes/ab1e992668cf3166a686


Blair

January 13, 2014 at 5:27 pm

Hey Josh, Followed Seth’s instructions and I’m getting this error message:

Parse error: syntax error, unexpected ‘<‘ in /home/catteven/public_html/wp-content/themes/pagelines/functions.php on line 22


Dean

January 14, 2014 at 4:01 am

Hi Blair,

The code you added in, try removing the first

<?php

as this probably already exists in the file.

  • This reply was modified 10 years, 10 months ago by Dean. Reason: code styling
Viewing 9 reply threads

The support post ‘Display all prices in the category page’ 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