Support

Home Forums Event Espresso Premium Min Max tickets

Min Max tickets

Posted: July 17, 2017 at 9:09 am

Viewing 11 reply threads


Bosworthsgc

July 17, 2017 at 9:09 am

Hi

I have an event at http://www.bosworthsgc.co.uk/snowglobe

We have public tickets and some that are only bookable by admin
Its run in timeslots and there is one admin ticket per half hour slot
When you hover over the dates it only shows the available admin tickets

On contrast we have grotto tickets done the same way but these are showing the total publicy available tickets for the day, which is how I wants it to show them
These are at http://www.bosworthsgc.co.uk/grotto

Are you able to advise why these two events are set up the same, but they are showing differently?

Thanks


Josh

  • Support Staff

July 17, 2017 at 1:22 pm

Hi Jonathan,

Normally the Grid view doesn’t display spaces remaining. Assuming you’ve added some code to display that, it might be related to how you’ve coded things and the way the ticket options are ordered.


Bosworthsgc

July 18, 2017 at 3:12 am

Hi Josh

We used some code that Tony supplied (from a previous ticket)

This is the reply from Tony:
This code:
echo ” . $remaintext . ”;
Should actually be:
echo ‘‘ . $remaintext . ‘‘;
I’d recommend adding a br at the begging to make sure the text is on its own line:
echo ‘<br/>‘ . $remaintext . ‘‘;
The wiki posts needs updating to prevent the browser from parsing the strong tags in the example.
The above won’t fix the problem if its not working but you’ll need it anyway.
Did you add the code to generate the $remaintext variable before using the above to use it? It should look something like this – http://take.ms/bvWdv


Bosworthsgc

July 18, 2017 at 3:13 am

This showed the number of main tickets remaining, but once we added the admin tickets, it shows the total number of admin tickets only and not the main tickets.
I have tried to change the order in which the tickets are displayed but that doesnt make any difference
If you can offer any advice it would be appreciated
Thanks


Tony

  • Support Staff

July 18, 2017 at 3:48 am

We used some code that Tony supplied (from a previous ticket)

That’s not actually my code, the text above is me advising some changes to the code you are using. It’s from:

https://eventespresso.com/wiki/events-grid-view-template-add-on/#ee4customizations

Are the admin tickets assigned to their own datetime?


Bosworthsgc

July 18, 2017 at 3:59 am

Hi Tony

Apologies – I thought it was your code

They each have their own date time yes.

Got the same setup for our grotto and that seems to be working fine
This is set up exactly the same

Only problem we had was that the original public booking ticket has 5 reserved against it, so we ended up deleting that ticket and creating a new one as the 5 reserved had copied across to all the duplicated events – could this be the reason?

Thanks


Tony

  • Support Staff

July 18, 2017 at 4:26 am

So all the normal tickets are assigned to one datetime and all admin to another?

If so can you test changing the ‘Event Start’ value of the ‘normal’ datetime to be later than the admin datetime. So right now they are both set to 2017-10-28 09:00 am, right? Try changing just the normal datetime start to 2017-10-28 09:10 am, does that fix the grid output?


Bosworthsgc

July 18, 2017 at 4:43 am

Hi Tony

Just tried that but no – it still shows the admin only ticket quantity


Bosworthsgc

July 18, 2017 at 5:16 am

Just tried the other way round and if I make the admin tickets later that works
I guess I can just change it by a minute on all of them and it would still be ok?


Tony

  • Support Staff

July 18, 2017 at 6:05 am

Sorry, that was me being a bit daft, it would need to be the admin ticket you made later.

Ok, so I know what is happening.

The grid template pulls in the datetimes for the event using this like:

$datetimes = EEM_Datetime::instance()->get_datetimes_for_event_ordered_by_start_time( $post->ID, $show_expired, false, 1 );

Which is basically saying ‘Pull all of the datetimes in this event ordered by start time, but only give me the first result’ (the grid is only intended for the next datetime).

You have 2 datetimes in your event with the same start date/time so on the snowglobe events you’re getting the ‘admin’ datetime, on the other, you’re getting the ‘normal’ datetime. The above forces the ‘normal’ datetime to be returned because the admin one is then later.

You could update each event to have a slightly later time for the admin ticket, or the grid template can be modified to pull the datetimes based on the order set in the event, so it could always use the ‘top’ datetime from the list.

Do you only use the grid template for these events? I’m asking because changing the grid template will mean you will need to check all instances where you are using it to make sure the correct details are output.


Bosworthsgc

July 18, 2017 at 6:37 am

Hi Tony

I think I can get round it by making all admin datetimes 1 minute past nine. I am only going to use this on the grid template as is
Would this be the easiest fix. I have changed all of December and tested it and it seems to work ok


Tony

  • Support Staff

July 19, 2017 at 3:46 am

Yeah, that should work fine.

It is probably the quickest solution without having to retest all other usage of the Grid template on your site.

Viewing 11 reply threads

The support post ‘Min Max 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