Support

Home Forums Event Espresso Premium Trouble With Form Display for Sold Out Events

Trouble With Form Display for Sold Out Events

Posted: October 20, 2016 at 4:58 pm

Viewing 11 reply threads


TinyTechs

October 20, 2016 at 4:58 pm

Hi,

I need to display a waiting list contact form in lieu of an actual waiting list for sold out events. I tried to use the code here: https://gist.github.com/joshfeck/fa7725952e9087c1a781

but nothing is displayed. I tried in my mods plugin as well as in functions.php. I also replaced the form display conditional clause with an echo statement and can’t see any output. Not getting any console errors. Not sure what I’m doing wrong. Is there anything that could be causing the snippet not to work?

Thanks,
Troy


Lorenzo Orlando Caum

  • Support Staff

October 21, 2016 at 6:32 am

Hi Troy,

Did you update the form ID to your actual form ID for Ninja Forms?

The example uses an ID of 1:

https://gist.github.com/joshfeck/fa7725952e9087c1a781#file-functions-php-L17


Lorenzo


TinyTechs

October 21, 2016 at 8:29 am

Thanks for your response Lorenzo. There is only one form, and it has an ID of 1 – shortcode is ninja_form id=1 – so shouldn’t need to update.


Josh

  • Support Staff

October 21, 2016 at 8:51 am

There are a few checks in that code so if any one of them return false (i.e. the function_exists() check and the sold out status check), then nothing will display, and that’s expected. You could try echoing out something to the screen on the AHEE_event_details_after_the_content action hook. This way you’ll be able see if your template is calling that hook or not.


TinyTechs

October 21, 2016 at 9:05 am

Thanks Josh. Will try that. There is some weirdness with the sold out status that I don’t understand, and maybe I should mention. To test this I’m manually changing the tickets available to match the tickets sold (1). The first time I do this and save, the event shows in the listing as sold out, and on the event page as sold out. If I make an additional change to the event and try to save, then the event disappears from the listing, and clicking “save as sold out” and “publish” won’t change that. I need to go back and increase the tickets so it is no longer sold out, publish, decrease the tickets again, and publish for the event to again show in the listing. Not sure if that is expected behavior or points to something that is going wrong.


TinyTechs

October 21, 2016 at 9:11 am

Also, for testing purposes I’m using twenty sixteen as a theme until I get everything working.


Josh

  • Support Staff

October 21, 2016 at 10:17 am

Yeah that’s expected behavior because normally when an event sells out it’s because a ticket sale is what triggers the sold out status. It’s not normal to trigger an event selling out by changing the ticket qty field. You could try setting the date time reg limit to a lower number instead.


TinyTechs

October 21, 2016 at 12:14 pm

Ok. So it was the way I was coming up with the sold out status that was the problem. I ended up buying the remaining tickets because that’s the way it will happen live, and the form shows up on the event page.

The problem now is that in this correct sold out status, the event does not show up on the upcoming events list on the venue page. I’m using a snippet for that you helped me with on another thread. The event does show up using the standard ESPRESSO_EVENTS shortcode, so maybe there is something I can change on the venue events snippet that will include the sold out events.


Josh

  • Support Staff

October 21, 2016 at 12:31 pm

Yeah that other snippet that adds events to a venue page sets a query parameter so only events with the status of “Publish” are displayed. Sold out events will get filtered out with that.


TinyTechs

October 25, 2016 at 4:53 pm

So I assume there is no status that will show active events that includes those that are sold out, correct? The issue it that we have a couple dozen venues in two states and would like to have the user first select the venue that is nearest them, and then see the events for that venue. If the sold out events aren’t displayed on the venue page, then they won’t be displayed anywhere, and we won’t be able to set up a wait list to fill the slots when people cancel.

Any ideas on other ways to tackle this with event espresso?


Josh

  • Support Staff

October 25, 2016 at 8:05 pm

So I assume there is no status that will show active events that includes those that are sold out, correct?

Not correct. The standard event list shows sold out events. Your code you’re using to display a list of event on a venue page can be adjusted to show sold out events.


TinyTechs

October 25, 2016 at 8:21 pm

Got it. I’ll figure it out

Viewing 11 reply threads

The support post ‘Trouble With Form Display for Sold Out Events’ 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