Support

Home Forums Event Espresso Premium MER limit to category

MER limit to category

Posted: November 2, 2015 at 10:36 am

Viewing 4 reply threads


Matthew Johnson

November 2, 2015 at 10:36 am

Hi,

How would I go about limiting multiple event registrations to the same category.

example – I have 10 events within 3 categories, I would select an event and add the ticket to the cart and then any tickets there after added would have to be in the same category as the first ticket to be added.


Lorenzo Orlando Caum

  • Support Staff

November 2, 2015 at 1:13 pm

Hi there Matthew,

Disabling the multiple events registration add-on for certain events is not currently available as the add-on does not have any settings to restrict certain events.

That is, when it is activated, then it allows events to be added to a cart site-wide.


Lorenzo


Matthew Johnson

November 3, 2015 at 2:05 am

Hi Lorenzo,

Thanks for the reply.

Is there then a hook that is triggered when an event is added to the cart that we could use to query the contents of the existing cart and conditionally remove the new event if it doesn’t match the category of another event in the cart?

Thanks


Josh

  • Support Staff

November 3, 2015 at 11:24 am

Hi Matthew,

If you look in /event-espresso-core-reg/modules/ticket_selector/EED_Ticket_Selector.module.php in the _add_ticket_to_cart method you’ll find the FHEE__EE_Ticket_Selector___add_ticket_to_cart__allow_add_to_cart hook. This can be used to prevent a ticket from being added to the cart.

If you run into any issues where it will help to add a new hook or pass in additional parameter to an existing hook, you can open a pull request and one of the developers can review:

https://github.com/eventespresso/event-espresso-core/issues


Matthew Johnson

November 4, 2015 at 10:21 am

Thanks Josh, I managed to get the feature I wanted using the hook.

Viewing 4 reply threads

The support post ‘MER limit to category’ 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