Posted: January 16, 2013 at 10:33 am
|
We’ve noticed that when an event time slot is sold out ($reg_limit), it’s removed from the drop down menu as an option. We’re wondering if perhaps instead it could remain but read “Sold Out”. Possible? Oh and thank you for such a great plugin! |
Hi Jess, How are you today? That’s a good little suggestion. The challenge will be to code this so that it does both (based on the preference of the user). Also, how would you like the drop-down to display, e.g.”Date – Sold Out”? |
|
|
Hi Garth! I’m having a great day, thanks! Right, so at the moment the drop down displays the time and the number of available tickets. It would be great if when the tickets are gone it would instead display the time and “sold out”, as you said above. I’m comfortable with editing the plugin code, and I would have tinkered with it already except my concern is if I leave the time as an option in the drop down (even though it’s sold out) I’m not sure if users would at that point still be able to purchase them. It may be more involved than I’d hoped. I was hoping there was just a spot that checks for the $reg_limit and shows/hides the option, that I could tweak. |
Hi Jess, You mention a drop down. Are you using one of the custom files add-on dropdown templates or something else? I can take a look at the code if I know what you are working with. |
|
|
When I create an event, I’m adding additional event times with a limit to the number of attendees – the “drop down” is being created on the registration page for users to choose from. I believe EE is doing it automatically as part of the default functionality |
Hi Jess, Thanks, I wasn’t exactly sure which dropdown we were talking about. The code that makes this happen is in /includes/functions/time_date.php starting on line 221. It’s fairly well commented there on what it’s doing on lines 225 and 226. The thing is, this is a selector box, so if that code were changed to simply make the unavailable times to display along with available times, all of them would be selectable. Newer browsers do support “disabled” options though. What’s cool about the disabled option is it can’t be selected and the browser (if supported) will gray out that option. So I’d imagine that someone could add something like:
Which would look like something like this in the plugin’s time dropdown function :
Does that help? |
|
ergh, I’ll try that posting that code in a gist: |
|
|
Yes!! That totally did it – you’re awesome. Thank you so much for the suggestions and detailed help! |
The support post ‘Event times sold out – display sold out?’ 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.