Support

Home Forums Event Espresso Premium Class Full Still showing "Confirm and go to payment page" button

Class Full Still showing "Confirm and go to payment page" button

Posted: August 14, 2012 at 11:48 am

Viewing 13 reply threads


Kevin Doherty

August 14, 2012 at 11:48 am

Could someone help me out with the proper if statement to hide the “confirm and go to payment page” button at checkout if a class is full? I wanted to hide this and add a link to a form or another page which im sure i can figure out.
thanksenter image description here


Josh

  • Support Staff

August 14, 2012 at 3:00 pm

It shouldn’t let you add an event to the cart if the event is full. Have you updated to Event Espresso 3.1.26?


Kevin Doherty

August 14, 2012 at 3:04 pm

sorry, not yet. Admittingly, I have made some label edits to some of the core plugin files to better suit my needs (changing terms like “Events” and “Attendess”) and was wondering if I could get away without updating and losing that progress.

I’ll back my files up, upgrade and see if this clears things up. If so, then no problem, I can always go back through and remake the edits.

out of curiosity on topic somewhat, do you know of a solution where I can compare the differences between files to easily see the differences so I can recreate my changes? mac based?

thanks Josh, I’ll upgrade and see what happens ๐Ÿ™‚


Kevin Doherty

August 14, 2012 at 3:25 pm

Ok, after updating the core plugin and template files, no affect.
I’m using a shortcode in my template to show the cart button and it shows even though I have the max amount of users confirmed paid for that event. Even that part I don’t mind and the system is showing the class is at its max which is great, just that “confirm and go to payment page’ which is killing me :(.


Kevin Doherty

August 14, 2012 at 4:06 pm

After some more testing the thing I realize is that if I’m checking out with more then 1 event and 1 of them is valid and not at capacity i need to make sure that the “confirm and go to payment” is visible then so that the user can at least checkout which ever events that are in their cart that are not at capacity.

so i need a way to write “if all events added to cart are at capacity, don’t show the ‘continue’ button”


Sidney Harrell

August 15, 2012 at 1:21 am

If you go into includes/functions/cart.php and change line 463 from:

$show_checkout_button = true;

to

$show_checkout_button = false;

and then go down to around line 528 and change it to:

if ($total_attendees_per_event > $attendee_limit || $total_attendees_per_event == 0) {
                                $attendee_overflow = true;
                            } elseif ($total_attendees_per_event < $attendee_limit) {
                                $show_checkout_button = true;
                            }

That should change the behavior to only displaying the button when at least one event in the cart is register-able.


Kevin Doherty

August 15, 2012 at 8:18 am

Hey Thanks Sidney, really thought that would fix it but no dice. I set my max amount (for testing) for the event to ‘2’ and it does show the class is full and echo’s the amount of attendees as 2 properly as well.

I also echo’d out the variables for total attendees and attendee limit to see what they were set at and was surprised to find they were off (atleast they seem to be)

take a look at the image and you” see the values are off. also included an admin screen shot so you can see i have the values set to 2 for max attendees and there are currently 2 attendees to the event.

also included an admin screen shot so you can see i have the values set to 2 for max attendees and there are currently 2 attendees to the event.


Kevin Doherty

August 15, 2012 at 8:32 am

OK so I see the “Total Attendees” has to do with the current session and the attendees I have via the dropdown, so that makes sense. Just not sure why the “Attendee Limit” is set to 6? Even though I have it set to 2.


Kevin Doherty

August 15, 2012 at 9:28 am

OK, so it looks like that variable i’m echoing above for “Attendee limit” is getting its value from the ‘max group registrants’ and adding 1 to it. So I guess I just need to use case a bit and set the total attendees to be more then the max amount registrants (which makes sense).

thanks.


Kevin Doherty

August 28, 2012 at 8:06 am

Still having problems with this. Does anyone have an answer. I let this problem get away from me and now have a live site where people are able to register for classes that are already at capacity.


Chris Reynolds

  • Support Staff

August 28, 2012 at 11:58 am

This is a bug in the current Multi Event Registration add-on. With the new version of Multi Event Registration in 3.2 this will not be an issue but right now the cart in Multi Event Registration allows you to add attendees to the event if there is a single space available. My recommendation would be to lower the maximum number of attendees and implement a waiting list event for overflow so you’re not overbooking events. Then you can contact people from the waiting list if you have spaces remaining.


Kevin Doherty

August 28, 2012 at 12:08 pm

OK, thanks Chris. I’m currently using a ton of shortcode (add to cart) buttons all over the site. Would there be a a condition I could wrap those in the front end?

if X class has the attendees >=(greater or equal) max_amount_attendees {
//dont show button
}else{

show shortcode button link
}

if that isn’t a feasible option then is there a way to get notified if a class is full ? Right now using these shortcodes for the add to cart buttons people are able to register even just 1 spot even though in the admin it shows (31/30). So i realize that with the multi event registration add on that you could potentially override the system by adding additional users to breach the capacity… if there is a way to disable the add to cart buttons automatically when a class meets its max amount, that would be the best.

Otherwise I’ll have to manually manage the buttons and remove them as the classes fill up (83 classes).

not sure if that helped shed any light for another potential work around?

thanks Chris, really can’t wait for 2.0 ๐Ÿ™‚


Chris Reynolds

  • Support Staff

August 28, 2012 at 1:04 pm

It’s possible, but not with the shortcodes. You’d need to hook into the data that’s being pulled from the database in the event_list.php (or registration_page.php depending on what you’re looking at) and possibly declare a new variable for number of attendees if it doesn’t already exist. All that data is there, it’s just a matter of making it do what you want it to.


Kevin Doherty

August 28, 2012 at 1:06 pm

OK thanks Chris, perhaps the premium support is the way to go on this.
thanks for the confidence that it can be done though.
cheers!

Viewing 13 reply threads

The support post ‘Class Full Still showing "Confirm and go to payment page" button’ 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