Support

Home Forums Event Espresso Premium Booked up events but it is not fully booked (not all events have the same issue)

Booked up events but it is not fully booked (not all events have the same issue)

Posted: July 18, 2018 at 4:55 am

Viewing 9 reply threads


SmartDevs

July 18, 2018 at 4:55 am

We have events that go over several weeks, participants can book themselves there at any time. however, the calendar says that the event is fully booked. How can we make it so that it’s not booked out anymore?

please look at the video πŸ™‚
video

i found some articles about that problem but the bugfix dont work and other solutions are also not work.


Tony

  • Support Staff

July 18, 2018 at 6:29 am

Hi there,

Can you add a screenshot of your datetime/tickets section for the ‘Klassik-Yoga (Do) – 28.06.-16.08.: 4. Kursstunde’ event please?

The section I want to see is this – http://take.ms/0Milq

https://slack-files.com/T02SY781D-FBSPXRHU5-0c74d35a11


SmartDevs

July 18, 2018 at 6:50 am

sure please check πŸ™‚https://www.screencast.com/t/VAg0F5KeK


Tony

  • Support Staff

July 18, 2018 at 12:08 pm

Hmmm, ok.

So the check for each of those datetimes to display like it does on your site is this:

if ($event->is_sold_out()
|| $datetime->sold_out()
|| $datetime->total_tickets_available_at_this_datetime() === 0
) {
    $tooltip_reg_btn_html = '<div class="sold-out-dv">';
    $tooltip_reg_btn_html .= esc_html__('Sold Out', 'event_espresso');
    $tooltip_reg_btn_html .= '</div>';
} elseif ($event->is_cancelled()) {
    $tooltip_reg_btn_html = '<div class="sold-out-dv">';
    $tooltip_reg_btn_html .= esc_html__('Registration Closed', 'event_espresso');
    $tooltip_reg_btn_html .= '</div>';
}

If $event->is_sold_out() or $event->is_cancelled() returned true, you’d expect the same result on all of the events datetimes in the calendar.

Which leaves $datetime->sold_out() || $datetime->total_tickets_available_at_this_datetime() === 0.

But I can’t reproduce the same problem on my test sites using a similar setup.

So, if you edit the event, and click on the cog icon next to the first datetime, the one named 1. Kursstunde.

In the settings you’ll find the Datetime ID – http://take.ms/6wWfT
(Note the ID number)

Then install and active this plugin on the site:

https://en-gb.wordpress.org/plugins/debug-bar/

Then this:

https://wordpress.org/plugins/debug-bar-console/

Next, go to the Dashboard, and in the Admin Bar at the top you’ll see ‘Debug’

Hover on that and go to console.

On the console add this code:

$datetime_id = 5;
$datetime = EEM_Datetime::instance()->get_one_by_ID($datetime_id);
var_dump($datetime->event()->is_sold_out());
var_dump($datetime->sold_out());
var_dump($datetime->total_tickets_available_at_this_datetime());
var_dump($datetime->tickets_remaining());

Note that $datetime_id = 5; must be changed for your datetime ID.

Click run on the console.

This is what it should look like – http://take.ms/oVSSu

What do you get in the Output section?


Tony

  • Support Staff

July 18, 2018 at 12:09 pm

Also, are you hooking in and changing the output of the calendar at all?

Any custom functions for modifying EE’s behavior? If so, test with those deactivated.


SmartDevs

July 23, 2018 at 3:35 pm

nothing happens when i click run πŸ™ in the console.


Josh

  • Support Staff

July 23, 2018 at 4:54 pm

Did you change the
$datetime_id = 5;
to match your event’s datetime ID?

It looks like it should be
$datetime_id = 783;

Also, can you answer the questions that Tony asked earlier?

Also, are you hooking in and changing the output of the calendar at all?
Any custom functions for modifying EE’s behavior? If so, test with those deactivated.


SmartDevs

July 24, 2018 at 12:09 pm

we have change nothing.

ok i check id 783 πŸ™‚


SmartDevs

July 24, 2018 at 12:14 pm

i deactivate 783 but nothing happens, there is no effect on the other events.


Josh

  • Support Staff

July 24, 2018 at 12:23 pm

I don’t think you’ll be deactivating anything. The script that Tony asked you to try was to get information. We’re you able to get that debug information about that datetime?

Viewing 9 reply threads

The support post ‘Booked up events but it is not fully booked (not all events have the same issue)’ 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