Support

Home Forums Event Espresso Premium Prerequisite Adult Ticket before Child Ticket Purchase

Prerequisite Adult Ticket before Child Ticket Purchase

Posted: March 21, 2013 at 6:42 am

Viewing 1 reply thread


Jason Yip

March 21, 2013 at 6:42 am

Hi,

I’ve just purchased a full license (with all the plug-ins) for event espresso so have yet to fully explore all the functionality – can I ask I’d like to setup an event where there Adult Tickets and Child Tickets. The Adult tickets have a price e.g. $10 but the child tickets are free. But you have to purchase an adult ticket before buying/ordering child tickets which you’re limited to 4.

Is this possible?

Thanks,

Jason


Josh

  • Support Staff

March 21, 2013 at 1:46 pm

Hi Jason,

This is possible, but it’s not an out of the box solution. First, you would likely need to modify the registration process so that it can only go through the shopping cart. This can be done by following this guide:

https://eventespresso.com/wiki/multiple-events-registration-use-add-to-cart-link-instead-of-default-registration-form/

Then you can set up your two price types, one for adults, and the free price type for child tickets. There’s a button in the event price section that will allow you to add prices.

Once you have the event set up, and add it to the cart, you’ll need to grab the price “names” by viewing the source of the page with a tool like Firebug. Here’s a screenshot showing what I mean by this.

Then you can add a bit of jQuery to the shopping_cart.php template, just below the closing form tag like this:

<script>jQuery(document).ready(function($){
    $("select[name='price_id[139][855]'] option[value='0']").remove(); 
    // removes the 0 option for the adult ticket
    $("select[name='price_id[139][856]'] option[value='5']").remove(); 
    // removes the 5 option for the child ticket
});
</script>

What that will do is force at least one adult ticket to be selected in the cart, and reduce the number of tickets available for the child ticket option. You will need to adjust the group limits accordingly.

Viewing 1 reply thread

The support post ‘Prerequisite Adult Ticket before Child Ticket Purchase’ 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