Support

Home Forums Event Espresso Premium Unexpected things when maximum number of attendees is reached

Unexpected things when maximum number of attendees is reached

Posted: February 22, 2017 at 3:22 pm

Viewing 7 reply threads


Anonymous

February 22, 2017 at 3:22 pm

In an event, although the maximum number of attendees is reached, the (translated) message We are sorry but this event has reached the maximum number of attendees is not displayed. Visitor can still add a ticket to the shopping cart. But, when checking out, a message please make sure to select at least one attendee or delete it from your cart is displayed.

I’m sure it’s me doing something wrong, can you tell me what I am overlooking? Thanks!


Josh

  • Support Staff

February 22, 2017 at 3:28 pm

Are you still using Event Espresso 3? Are you adding the ticket to the cart via a page that has a cart short code or is it the page with the event list?


Anonymous

February 23, 2017 at 2:19 am

Yes, still using EE3.

Ticket is added to cart through this:

[ESPRESSO_CART_LINK event_id=468 anchor=”Voeg toe aan mijn reservering” direct_to_cart=1 moving_to_cart=”Toevoegen aan reservering…”]


Josh

  • Support Staff

February 23, 2017 at 9:15 am

You can take that short code down, and any others that point to sold out events, to avoid the errors you’re seeing.


Anonymous

February 24, 2017 at 7:15 am

Thank you for your answer, this is exactly the work around applied right now.

Ideal would be, however, if EE would display an appropriate message by itself. Searching in EE I found that there is relevant code in multi_registration_page.php (line 162) and registration_page.php (line 238):

if ($num_attendees >= $reg_limit) {
|
<?php _e(‘We are sorry but this event has reached the maximum number of attendees!’, ‘event_espresso’); ?>

Shouldn’t the if-statement return a ‘true’ and display the right message?


Josh

  • Support Staff

February 24, 2017 at 8:01 am

I’m sorry I don’t follow your logic because the cart short code does not run from multi_registration_page.php or registration_page.php.

If you want to submit a pull request we can review.


Anonymous

February 24, 2017 at 8:37 am

Ah, I didn’t realise that.

Is there any way to automatically inform the visitor that an event has reached the maximum number of attendees and prevent booking?

Or is your solution from February 23, 2017 9:15 am the only way?


Josh

  • Support Staff

February 24, 2017 at 9:05 am

Instead of pointing them to a page with the ADD to CART short code on it, you give them a link to the EE3 event page. On the event page you can put the ticket selector shortcode.

Once the event is sold out, it automatically removes the cart links and displays a sold out message.

Viewing 7 reply threads

The support post ‘Unexpected things when maximum number of attendees is reached’ 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