Support

Home Forums Event Espresso Premium registrtion limit

registrtion limit

Posted: May 6, 2021 at 12:41 am

Viewing 9 reply threads


OTLSeatFillers

May 6, 2021 at 12:41 am

I need to set limit of ticket with different user role wise..
also no other user registration at same time with same event..


Tony

  • Support Staff

May 6, 2021 at 2:38 am

Hi there,

I need to set limit of ticket with different user role wise..

This is not something we have within Event Espresso currently, we don’t limit ticket qty’s based on user/capability/role so this would require custom development.

also no other user registration at same time with same event..

I’m not sure I understand this, can you explain a little more please?


OTLSeatFillers

May 6, 2021 at 4:39 am

In the previous version EE#3 , template copies on the wp-content/theme/registration_page_display.php file directory
also create custom developement like if condition valid then display registration form other wise message like you can’t register

also i used ‘action_hook_espresso_save_attendee_data’ hooks

is there a similar structure in EE4?

Thanks!


Tony

  • Support Staff

May 6, 2021 at 4:49 am

Yes, EE4 has thousands of hooks, it just depends on when you want your code to execute.

For example, if you are looking to remove the ticket selector and display a message in place of it when a user has previously register there is an example here:

https://gist.github.com/Pebblo/10669adfeea322ade3d96a38857fb46b


OTLSeatFillers

May 6, 2021 at 10:55 pm

Hello,

Thanks for help..
Can you please let me know which hooks can be use when register attendees..?

Thanks!!


Tony

  • Support Staff

May 7, 2021 at 10:53 am

Sure, at what specific point during execution do you want to hook in?

It works differently in EE3 as the registrations are created early on and then updated as you progress through the reg steps.

So you could use:

AHEE__Single_Page_Checkout__process_reg_step__attendee_information__process_reg_step

To hook in BEFORE spco has processed each individual registration.

Or if you want to hook in after the attendee_info reg step has been processed you could use:

AHEE__EE_Single_Page_Checkout__process_attendee_information__end

There are many hooks on every request so I’ll need more specific details on what and when you want to hook in to advise further on a specific hook you can use.

To go with the above I highly recommend you take a look at the doc for our model system:

https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System

You’ll need to understand the models to be able to pull in any data you need for the registration etc.


OTLSeatFillers

May 13, 2021 at 3:19 am

Hello,
Can you please help me on below topics .?
1)How to hide and show attendees registration form using role wise..?
2)How to display message your limit is over message if user completer their ticket limit?
Thanks!!


Tony

  • Support Staff

May 13, 2021 at 3:27 am

1)How to hide and show attendees registration form using role wise..?

Checking this on the registration form is after the user has submitted tickets, that means the tickets they selected are going to go in reserve for the duration of the user’s session (by default 1 hour). Ideally you want to do this on the ticket selector using something similar to the snippet I gave you earlier:

https://eventespresso.com/topic/registrtion-limit/?view=all#post-323670

However, not that checking a users ‘role’ for this would be considered doing_it_wrong(), you should use capabilities on the role, not the role itself.

Take a look here: https://developer.wordpress.org/reference/functions/current_user_can/

2)How to display message your limit is over message if user completer their ticket limit?

Again, the snippet above is the closest to what you are requesting already. You’ll need some custom code to count/compare/save the ticket count/limit and then display the message as we don’t have anything within core that will do that for you.


OTLSeatFillers

May 17, 2021 at 2:27 am

Hello,
I want to set max ticket quantity for all new event..
i don’t want to add from edit event..
Thanks!!


Tony

  • Support Staff

May 17, 2021 at 7:18 am

Do you mean the ‘Maximum number of tickets allowed per order for this event:’ value?

If so you can change that in Event Espresso -> Events -> Default Settings (tab) -> ‘Default Maximum Tickets Allowed Per Order’

Viewing 9 reply threads

The support post ‘registrtion limit’ 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