Support

Home Forums Event Espresso Premium Event Price on [EVENT_LIST] page incorrect

Event Price on [EVENT_LIST] page incorrect

Posted: August 22, 2012 at 10:30 am

Viewing 5 reply threads


Candi Stroh

August 22, 2012 at 10:30 am

I have tried several different ways to get the correct price to show up on my events list page. I have swapped around the prices in the event itself, i have changed the names of the fees, and that worked on some events, but for my main event that we will be using the registration form on isn’t displaying the correct price, plus is there a way to include all the prices on the [EVENT_LIST] page and that would solve my problem.


Chris Reynolds

  • Support Staff

August 22, 2012 at 11:04 am

This is coming in 3.2 but there isn’t an easy way to do it in 3.1.x because the prices are stored as an array. Displaying each price separately is just a matter of pulling the price from each position in the array. Where this gets tricky is if you have multiple events with a different number of price levels for each since you can’t just say “give me price values 0, 1, 2 and 3 for all events” if some of your events have 4 price levels and some have 2.

However, if you do have the same number of price levels for all of your events, a fairly reasonable workaround would be to use the [EVENT_PRICE] shortcode and display each price individually. For that matter, you could do this in the event description and hide the price from the event_list_display.php template. Just make sure you use the number parameter in the shortcode to indicate which price in the array you are displaying.


Candi Stroh

August 22, 2012 at 12:01 pm

Ok i commented out the event price section in the event_list_display.php and its working by not showing the prices and the code i entered is as follow:

Now to show the prices I entered into my event the following:
[EVENT_PRICE event_id=”31″ number=”0″]
[EVENT_PRICE event_id=”31″ number=”1″]
Except I think i have to do something somewhere to make these prices show in the event_display_box ??? in my style sheet? Correct?


Chris Reynolds

  • Support Staff

August 22, 2012 at 12:35 pm

If you want it to display by default for all your events (and all your events have 2 price levels), you’ll need to add it to event_list_display.php wrapped in a do_shortcode function, e.g.:

<?php echo do_shortcode('[EVENT_PRICE event_id=' . $event_id . ' number="0"]'); ?><br />
<?php echo do_shortcode('[EVENT_PRICE event_id=' . $event_id . ' number="1"]'); ?>


Candi Stroh

August 24, 2012 at 8:05 am

I am still working on this and the code that you gave me works fine, but I am playing around with it some to see if i can tweak it to make it work for me. I have three price levels on the majority of my events. I have several free events that the price keeps showing as $0.00. That is where I am with that. Any recommendation that you can provide will always be helpful.


Chris Reynolds

  • Support Staff

August 24, 2012 at 5:17 pm

Why don’t you do a check for a free event first, then do the event prices if it’s not free? Something like what’s already in event_list_display.php:

 <?php if ( $event->event_cost != '0.00' ) { 
 /* do your non-free business here */ ?>
      <p id="p_event_price-<?php echo $event_id ?>" class="event_price">
           <?php echo do_shortcode('[EVENT_PRICE event_id=' . $event_id . ' number="0"]'); ?><br />
           <?php echo do_shortcode('[EVENT_PRICE event_id=' . $event_id . ' number="1"]'); ?>
      </p>
 <?php } else { ?>
      <p id="p_event_price-<?php echo $event_id ?>" class="event_price"><?php echo __('Free Event', 'event_espresso'); ?></p>
 <?php } ?>
Viewing 5 reply threads

The support post ‘Event Price on [EVENT_LIST] page incorrect’ 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