Posted: December 10, 2014 at 11:11 am
|
Is there a way to display the early bird registration cost on the event archive page (https://eventsignup.org/event-registration/)? It does show it on the specific event page, just not the overall page. |
Hi Greg, Yes, there is and it does involve a bit of PHP programming to make it display the early discount pricing. If you open up the event_list_display.php file around line 80 you’ll find:
The very last part of that actually displays the price: You can change it to be: The espresso_return_single_price() function will display more price info including the early registration price if applicable. As an aside, it looks like the espresso_return_single_price() function handles the formatting differently for the early discount pricing. Please let me know if you’d like help with getting the formatting consistent between the regular price and discounted price if you go this route. |
|
|
OK, this did what I was hoping it would…though, it stripped out the surcharge from the pricing. |
Are you sure it stripped out the surcharge from price? 12.50+2.50 = $15.00, right? |
|
|
My bad…moving too fast, it is actually right. Now one more follow-up…the zero is getting dropped on the event archive page (https://eventsignup.org/event-registration/) for pricing. So instead of displaying $12.5, how can I get it to $12.50. |
Hi Greg, When testing this out on my local site I noticed this too. If you open up includes/functions/pricing.php you’ll find where the espresso_return_single_price() function is defined starting around line 37. On line 63 you’ll see where it returns the $event_cost when there’s an early registration discount. It doesn’t have the number_format() applied to it like the non-discounted prices do. I just pushed a fix for this for Event Espresso 3.1.37.p, and you can apply the same fix by changing that line to:
|
|
|
OK, easy enough…thanks a lot! |
|
Glad you got it sorted, is there anything else we can help with in respect to this forum thread? |
The support post ‘Display Early Bird Pricing on Event Archive 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.