Home › Forums › Welcome! › Pre-Sales Questions › Limit places at events
- This topic has 2 replies, 3 voices, and was last updated 8 years, 7 months ago by Support Droid.
-
AuthorPosts
-
August 17, 2015 at 3:40 am #996546NickParticipant
Hello,
is it possible to set a limit to the amount of places/tickets that an event is able to offer?
If so, is it possible to show a warning when tickets/places for that event are running low? i.e ‘only 5 places left, book now!’
Thanks
August 17, 2015 at 9:07 am #996620GeorgeParticipantHey Nick!
For actually setting a limit on number of tickets available for an event, it seems like the default “Ticket Stock” option would work great for this. Here’s a screenshot of what I’m referring to, just to be 100% clear → https://cloudup.com/cKOb4GTVzGB
Now, as for displaying a message when the ticket stock is low, that would unfortunately require some custom code. We don’t offer support for custom code, technically, but I do have some code that you can use for reference here → https://gist.github.com/ggwicz/e4d0d46cdf6d3977e5bc#file-ticket-stock-example-php
When you use that function, as it stands right now it will just display the ticket stock numbers on the front-end of your site. But notice the $ticket->stock variable down at the end of line 27 in that file?
Well, if you simply add some extra code here that displays a message when it is less than nor equal to 5 (i.e. when only 5 or fewer tickets remain…), then you should be good to go here. Something like:
if ( $ticket->stock && 5 <= $ticket->stock ) {
printf( 'Only %s tickets remain, book now!', $ticket->stock );
}
I hope that helps, cheers!
— George
September 1, 2015 at 7:05 am #1000850Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Limit places at events’ is closed to new replies.