Support

Home Forums Event Espresso Premium "Free Event" tag displaying incorrectly

"Free Event" tag displaying incorrectly

Posted: December 22, 2012 at 10:40 am

Viewing 3 reply threads


Tom Parker

December 22, 2012 at 10:40 am

We’ve wrestled with price display and free event tags on the registration page and believe we’ve fixed it. But I can’t figure out why we seeing BOTH a price and the text “Free Event” on the list page.

http://nwdocumentary.org/workshops

Event setup: Every event has multiple prices. Some have zero as an option, some don’t. If you’re looking, DIY Documentary does NOT have a zero price option, Shooting Interviews does. Members add-on is not currently activated since we don’t have a process for getting members added to WP right now. We’re simply designating member and non-member pricing in the event and verifying manually.

I haven’t customized the list page. For registration pages, I’ve used the change I saw in another forum post to force the default price to be the first one. The I removed the IF statement for displaying free event since it was causing “Free event” to be displayed instead of a price every time 0 was an option. (I’d like to make this more nuanced if possible, since there will be free events where the only price will be zero, if you have code to make that possible. But if there’s a non-zero option, I can’t have Free event display.)

So the issue is that my list page is showing both a price and the free event text. This is the case even when there is NOT a zero price option. My admittedly poor PHP skills don’t see any problem with the IF statement; I wouldn’t expect to see both a price and the free event text display based on the code.

What I’d like to see: the first price if a non-zero price is present, free event if the ONLY price is 0.00.

WordPress Version: 3.4.2
PHP Version: 5.2.17
MySQL Version: 5.5.28
Event Espresso Version: 3.1.29.1P
Multiple Event Version: 1.0.4

Thanks for any help.

cheers,
tom


Dean

December 24, 2012 at 1:12 am

Hey Tom,

Can you post the code you modified to somewhere like pastebin so we can have a look please? And also confirm which file was changed. Im pretty sure it is to do with the modification.


Tom Parker

December 24, 2012 at 9:53 am

Uh oh. Yes, it is my modification. Looking at it again, I only removed the IF, so Free Event appears every time. But before, it appeared if ANY price was zero, and I can’t have that, either.

Can you give me the correct modification so that Free Event will appear, but only if it’s the only price? If that’s not practical, we can do it based on the id=0 price, which will always be non-zero if it’s not free.

Here is what I currently have for event_list_display.php: http://pastebin.com/cb5VH8rm


Dean

December 27, 2012 at 12:32 am

Hi Tom,

Sorry for the late response, Christmas and all.

If you dont mind that the dropdown in the individual registration page will show the free option as the first choice, then the default action for the latest Event Espresso does what you want already.

If there is only one price and it is zero, it will show Free Event. If there is multiple prices, then that last price entered on the event is what is shown on the event list page, so long as that isnt zero, it will show the figure.

So I would recommend reverting to the default template code and looking at the pricing options to make sure that a value is the last choice not zero.

Viewing 3 reply threads

The support post ‘"Free Event" tag displaying incorrectly’ 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