Support

Home Forums Event Espresso Premium EE4 Cannot create more than 20 tickets

EE4 Cannot create more than 20 tickets

Posted: July 2, 2014 at 11:33 pm

Viewing 16 reply threads


Stephen Grehan

July 2, 2014 at 11:33 pm

Hi,

Since Pomotional Codes are not yet supported on EE4, I am creating duplicate tickets which I use for each promotion. However, after 20 tickets they disappear from the event once I click on Update.

According to the docs, EE4 “enables event managers to create a variety of ticket options to accommodate the maximum number of attendees and collect the right fees. An unlimited number of tickets can be configured”.

What am I missing?


Dean

July 3, 2014 at 3:49 am

Hi,

What version of PHP are you using please? You can find this out via the Support tab in the Help & Support menu.


Stephen Grehan

July 3, 2014 at 4:22 am

Hi Dean, here goes the info

WordPress Version:
3.9.1
PHP Version:
5.4.23
MySQL Version:
5.5.34
Event Espresso Version:
4.2.5.p


Tony

  • Support Staff

July 3, 2014 at 10:58 am

Hi Stephen,

This is not a limit within Event Espresso itself, but likely your server configuration.

If your server is running a version of PHP version 5.3.9 or greater, there is a new PHP.ini option called max_input_vars which has the basic functionality of limiting how many incoming variables may be accepted in the various PHP super globals ($_GET,$_POST,$_COOKIE). Since the event editor has the potential for creating a lot of datetimes and tickets, the value for this option does set an upper limit on how many tickets and datetimes you can create.

Most PHP installations have this option at the default setting of 1000. There are a lot of variables that affect how many tickets and datetimes you can actually create with this setting (i.e. are there are other plugins adding form fields to your event editor?) but generally speaking if you have one datetime, you will be able to create around 30-35 tickets/event before hitting that limit.

If you need to increase the number of tickets and datetimes, the only way to do so is if you are able to configure your php.ini file on your server. Most web hosts have documentation on how to do so. Depending on your webhost you should be able to add the following lines to your php.ini file or .htaccess (on apache) and it should work:

php_value max_input_vars 2000
##note below values are only needed if your server uses the Suhosin patch
php_value suhosin.get.max_vars 2000
php_value suhosin.post.max_vars 2000
php_value suhosin.request.max_vars 2000

You may need to chose a value greater than 2000 depending on the quantity of tickets your would like to create.


Stephen Grehan

July 3, 2014 at 7:00 pm

Hi Tony,

Thanks for your reply.

I tried both adding .htaccess to the root directory and modifying my php.ini file and restarting apache but the changes do not take effect. When I echo max_input_vars it is still 1000.


Lorenzo Orlando Caum

  • Support Staff

July 3, 2014 at 8:12 pm

Hello, try this in your php.ini file:

max_input_vars 2000

If it still fails, then ask your web host to apply the change for you.


Lorenzo


Stephen Grehan

July 4, 2014 at 6:28 am

Thanks all,

I managed to apply the changes in php.ini. I was only restarting apache
but I also needed to restart php-fpm for the changes to take effect.

Back to the topic, is there a better way to handle discount coupons in EE4? I know the feature is not yet released but could you recommend an alternative approach like some way of dynamically modifying the ticket prices?

Thanks.


Tony

  • Support Staff

July 4, 2014 at 8:57 am

Unfortunately not currently.

Currently the only way to apply discount for events is to create tickets including that discount which match the criteria (Min 4 ticket for example)

Dynamically altering the ticket prices would require some fairly extensive core modifications at this time as the details are pulled from the database from several locations, in several stages within the registration, this is not something we can recommend modifing.


Stephen Grehan

July 4, 2014 at 11:07 am

Hi Tony,

I think I’m getting close now. I managed to increase max_input_vars and now I can create enough tickets to meet my needs. However I’m facing a new problem.

I have 12 ticket types and 2 promotional codes. I duplicate each ticket for each promotional code so that I end up with 36 tickets. After the user types a promotional code, I use jQuery to leave the 12 tickets relevant to that code and .remove() the other 24.

When I select some of the tickets and click on “Register Now”, I get the following message: “Nothing in your Event Queue: You need to select at least one event before you can proceed with the registration process”.

Any clues?

Thanks as always.


Tony

  • Support Staff

July 4, 2014 at 11:12 am

Hmm, there could be a few reasons for this.

Can you link me to the event so we can investigate please?


Stephen Grehan

July 4, 2014 at 11:46 am

In my live event I am temporarily using .hide() instead of .remove() to avoid getting the “Nothing in your Event Queue” message.

You can follow the following steps to remove the hidden tickets and reproduce my problem:

1. Go to:
http://www.ww1queenslanderchallenge.com.au/events/ww1-queenslander-challenge/?coupon=healthworks

2. To remove the hidden tickets, type in the js console:
$(‘.tckt-slctr-tbl-tr:hidden’).next().andSelf().remove();

3. Click on “Register Now” and you should get the “Nothing in your Event Queue” message.


Stephen Grehan

July 4, 2014 at 11:52 am

When you copy and paste the jQuery line in step 2 be sure to fix the quotation marks, or use this instead:

$('.tckt-slctr-tbl-tr:hidden').next().andSelf().remove();


Tony

  • Support Staff

July 4, 2014 at 12:30 pm

Hi Stephen,

.remove() completely removes the ticket form from the DOM, meaning some form elements do not get included in the submit, which Event Espresso is not expecting and is why you get the nothing in your event queue error.

Is there a particular reason you want to use .remove() over .hide()?


Brent Christensen

  • Support Staff

July 4, 2014 at 12:37 pm

Hi Stephen,

I’m Event Espresso’s lead developer. I’ve looked at your site and have one question?

Why do you have to remove the hidden inputs?

Everything appears to work fine until you add this JS into the mix:
$('.tckt-slctr-tbl-tr:hidden').next().andSelf().remove();

I went to the link you posted…
it ONLY displays the tickets that are applicable to the “coupon=healthworks” url param (GOOD)…
I select an option and click register and it takes me to the registration form with the correct option selected (GOOD).

Not sure why you are trying to “fix something that ain’t broke” ?!?!?


Brent Christensen

  • Support Staff

July 4, 2014 at 1:10 pm

Hi Stephen,

I have one more question regarding your reg form…

Did you know that EE can do ticket bundles ???

Let’s say you wanted to create a ticket bundle for your 10 Person Team.

Go into your Event Editor, find that ticket and open up the advanced settings by clicking on the little gear icon.

Set the price to be the cost of ONE ticket for the bundle (ie the price PER ticket)

Then set the BOTH the min and the max quantity inputs to 10

So it should look something like this: http://awesomescreenshot.com/09133hyh2f

Then remember to update the event.

The ticket selector will now show something like this: http://awesomescreenshot.com/09133hz498
and although you can’t see it in that image, the qty selector only lets you choose either 0 or 10. (I’ve added the “(price is per person)” message into the ticket name).

Then the registrations form will look something like this: http://awesomescreenshot.com/05233hzj8d
which will separate out all of the question groups for each attendee into it’s own section, which makes the form much easier to read than what you currently have (imho). Please note that you can control what questions are asked of the Primary Registrant as well the Additional Attendees within the Event Editor via the Questions Meta Boxes: http://awesomescreenshot.com/01833i0p20
And you can even create custom question groups as well.

Not only would using ticket bundles make your registration form look a little nicer, but it will also give you MUCH better data with regards to the number of registrations for each event. If I asked you how many people have registered for a particular race, using your current system, you would have to look at what tickets were purchased, then multiply those numbers by how many people each ticket was for. Using ticket bundles, you would already have an exact count for how many people were attending a race because you would have a single registration record for EACH attendee. AS WELL… for each “unique” registration (determined by a combination of first name, last name, and email address) a Contact record would be created which would allow you to have a list of everyone who has ever attended any event you have put on. This is great for marketing purposes, etc.

Anyways.. just a suggestion. Hope it helps.


Stephen Grehan

July 6, 2014 at 5:42 pm

Hi Tony and Brent,

About your first question, I wanted to .remove() instead of .hide() for increased security (so that the discounted tickets did not show in the DOM when viewing the source code).

It is a weird behaviour that the response page expects variables from the unselected tickets, but I guess I can live with .hide() instead of .remove(). After all, a sell is a sell, and if a hacker un-hides the discounted ticket then I guess he/she deserves the discount 🙂


Stephen Grehan

July 6, 2014 at 5:50 pm

Hi Brent,

Thanks for the bundle approach suggestion, I’ll definitely do that. I took over managing this site over another “engineer” and I have no idea why he decided to add hacks all over the place instead of using EE4’s functionality.

Thanks all for your input.

Viewing 16 reply threads

The support post ‘EE4 Cannot create more than 20 tickets’ 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